Per-job events stream (SSE)
curl --request GET \
--url https://api.reader.dev/v1/jobs/{id}/stream \
--header 'x-api-key: <api-key>'import requests
url = "https://api.reader.dev/v1/jobs/{id}/stream"
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.reader.dev/v1/jobs/{id}/stream', 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.reader.dev/v1/jobs/{id}/stream",
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.reader.dev/v1/jobs/{id}/stream"
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.reader.dev/v1/jobs/{id}/stream")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reader.dev/v1/jobs/{id}/stream")
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"event: job:progress\ndata: {\"jobId\":\"j_abc\",\"status\":\"processing\",\"completed\":45,\"total\":100}\n\nevent: job:completed\ndata: {\"jobId\":\"j_abc\",\"status\":\"completed\",\"completed\":100,\"total\":100,\"creditsUsed\":100}\n\n"{
"success": false,
"error": {
"code": "unauthenticated",
"message": "Missing or invalid API key",
"docsUrl": "https://reader.dev/docs/home/concepts/errors#unauthenticated"
}
}{
"success": false,
"error": {
"code": "not_found",
"message": "Job not found",
"docsUrl": "https://reader.dev/docs/home/concepts/errors#not-found"
}
}Jobs
Per-job events stream (SSE)
Server-Sent Events stream scoped to a single job. Emits progress, page, error, and done events as the job makes progress. Stream closes automatically when the job reaches a terminal state.
GET
/
v1
/
jobs
/
{id}
/
stream
Per-job events stream (SSE)
curl --request GET \
--url https://api.reader.dev/v1/jobs/{id}/stream \
--header 'x-api-key: <api-key>'import requests
url = "https://api.reader.dev/v1/jobs/{id}/stream"
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.reader.dev/v1/jobs/{id}/stream', 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.reader.dev/v1/jobs/{id}/stream",
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.reader.dev/v1/jobs/{id}/stream"
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.reader.dev/v1/jobs/{id}/stream")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reader.dev/v1/jobs/{id}/stream")
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"event: job:progress\ndata: {\"jobId\":\"j_abc\",\"status\":\"processing\",\"completed\":45,\"total\":100}\n\nevent: job:completed\ndata: {\"jobId\":\"j_abc\",\"status\":\"completed\",\"completed\":100,\"total\":100,\"creditsUsed\":100}\n\n"{
"success": false,
"error": {
"code": "unauthenticated",
"message": "Missing or invalid API key",
"docsUrl": "https://reader.dev/docs/home/concepts/errors#unauthenticated"
}
}{
"success": false,
"error": {
"code": "not_found",
"message": "Job not found",
"docsUrl": "https://reader.dev/docs/home/concepts/errors#not-found"
}
}Stream events for a single job over a long-lived HTTP connection. Events fire as pages complete and the stream closes automatically when the job reaches a terminal state.
The SDK clients wrap this as
Event types
| Event | Payload |
|---|---|
progress | { status, completed, total }: periodic progress snapshots |
page | A completed page result (same shape as a sync scrape) |
error | { url, error }: a single page failed |
done | { status, completed, total }: final event, stream closes |
reader.stream(jobId) returning an async iterator. See SSE streaming.
For a workspace-wide stream of every job’s events, use GET /v1/events instead.Authorizations
Path Parameters
Response
SSE stream that closes when the job terminates
Server-Sent Events stream. Each frame is a line-delimited event with an event: line, a data: line (JSON payload), and a trailing blank line. Keep-alive comments (: ping) are sent every 30 seconds. See Events for the full event catalog.
Example:
"event: job:progress\ndata: {\"jobId\":\"j_abc\",\"status\":\"processing\",\"completed\":45,\"total\":100}\n\nevent: job:completed\ndata: {\"jobId\":\"j_abc\",\"status\":\"completed\",\"completed\":100,\"total\":100,\"creditsUsed\":100}\n\n"

