curl --request GET \
--url https://api.valyu.ai/v1/contents/jobs/{job_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.valyu.ai/v1/contents/jobs/{job_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.valyu.ai/v1/contents/jobs/{job_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.valyu.ai/v1/contents/jobs/{job_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.valyu.ai/v1/contents/jobs/{job_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.valyu.ai/v1/contents/jobs/{job_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.valyu.ai/v1/contents/jobs/{job_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"job_id": "cj_a1b2c3d4e5f6g7h8",
"status": "completed",
"urls_total": 25,
"urls_processed": 23,
"urls_failed": 2,
"created_at": 1707000000000,
"updated_at": 1707000060000,
"current_batch": 3,
"total_batches": 5,
"results": [
{
"url": "https://en.wikipedia.org/wiki/Quantum_computing",
"status": "success",
"title": "Quantum computing - Wikipedia",
"content": "# Quantum computing\n\nQuantum computing is a type of computation...",
"description": "Quantum computing is a type of computation that harnesses quantum mechanical phenomena.",
"source": "web",
"price": 0.001,
"length": 24500,
"data_type": "unstructured",
"source_type": "website",
"publication_date": "2024-03-15",
"id": "https://en.wikipedia.org/wiki/Quantum_computing",
"image_url": {
"0": "https://upload.wikimedia.org/wikipedia/commons/quantum.png"
},
"screenshot_url": null,
"summary": "<string>",
"summary_success": true,
"structured_metadata": {},
"error": "Could not extract content from this URL. The page may be unavailable, require sign-in, or block automated access.",
"doi": "10.26434/chemrxiv-2025-chn4j",
"authors": [
"<string>"
],
"citation_count": 5
}
],
"actual_cost_dollars": 0.023,
"error": "<string>"
}{
"success": false,
"error": "Invalid API key"
}{
"success": false,
"error": "API key does not have inference permission"
}{
"success": false,
"error": "Task not found"
}{
"success": false,
"error": "Internal server error. Please try again later."
}Contents Job Status
Reference for polling async content extraction job status via GET /v1/contents/jobs/.
curl --request GET \
--url https://api.valyu.ai/v1/contents/jobs/{job_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.valyu.ai/v1/contents/jobs/{job_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.valyu.ai/v1/contents/jobs/{job_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.valyu.ai/v1/contents/jobs/{job_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.valyu.ai/v1/contents/jobs/{job_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.valyu.ai/v1/contents/jobs/{job_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.valyu.ai/v1/contents/jobs/{job_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"job_id": "cj_a1b2c3d4e5f6g7h8",
"status": "completed",
"urls_total": 25,
"urls_processed": 23,
"urls_failed": 2,
"created_at": 1707000000000,
"updated_at": 1707000060000,
"current_batch": 3,
"total_batches": 5,
"results": [
{
"url": "https://en.wikipedia.org/wiki/Quantum_computing",
"status": "success",
"title": "Quantum computing - Wikipedia",
"content": "# Quantum computing\n\nQuantum computing is a type of computation...",
"description": "Quantum computing is a type of computation that harnesses quantum mechanical phenomena.",
"source": "web",
"price": 0.001,
"length": 24500,
"data_type": "unstructured",
"source_type": "website",
"publication_date": "2024-03-15",
"id": "https://en.wikipedia.org/wiki/Quantum_computing",
"image_url": {
"0": "https://upload.wikimedia.org/wikipedia/commons/quantum.png"
},
"screenshot_url": null,
"summary": "<string>",
"summary_success": true,
"structured_metadata": {},
"error": "Could not extract content from this URL. The page may be unavailable, require sign-in, or block automated access.",
"doi": "10.26434/chemrxiv-2025-chn4j",
"authors": [
"<string>"
],
"citation_count": 5
}
],
"actual_cost_dollars": 0.023,
"error": "<string>"
}{
"success": false,
"error": "Invalid API key"
}{
"success": false,
"error": "API key does not have inference permission"
}{
"success": false,
"error": "Task not found"
}{
"success": false,
"error": "Internal server error. Please try again later."
}Authorizations
API key for authentication. Get yours at platform.valyu.ai.
Path Parameters
The job ID returned by the async contents request.
Response
Job status and results (when complete).
Async job status and results.
Whether the request succeeded.
true
Unique identifier for the async job.
"cj_a1b2c3d4e5f6g7h8"
Current job status.
pending- Job created, not yet startedprocessing- URLs are being processedcompleted- All URLs processed successfullypartial- Processing finished with some failuresfailed- All URLs failed
pending, processing, completed, partial, failed "completed"
Total number of URLs to process.
25
Number of URLs successfully processed so far.
23
Number of URLs that failed processing.
2
Job creation time as Unix timestamp in milliseconds.
1707000000000
Last update time as Unix timestamp in milliseconds.
1707000060000
Current batch being processed. Only present when status is "processing".
3
Total number of batches. Only present when status is "processing".
5
Extraction results. Only present when status is "completed" or "partial".
Show child attributes
Show child attributes
Total cost in USD. Only present when processing is complete.
0.023
Error message. Only present when status is "failed" or "partial".
Was this page helpful?

