Skip to main content
POST
/
paas
/
v4
/
reader
Web Reader
curl --request POST \
  --url https://api.z.ai/api/paas/v4/reader \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "https://www.example.com"
}
'
import requests

url = "https://api.z.ai/api/paas/v4/reader"

payload = { "url": "https://www.example.com" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://www.example.com'})
};

fetch('https://api.z.ai/api/paas/v4/reader', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
HttpResponse<String> response = Unirest.post("https://api.z.ai/api/paas/v4/reader")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://www.example.com\"\n}")
.asString();
{
  "id": "<string>",
  "created": 123,
  "request_id": "<string>",
  "model": "<string>",
  "reader_result": {
    "content": "<string>",
    "description": "<string>",
    "title": "<string>",
    "url": "<string>",
    "external": {
      "stylesheet": {}
    },
    "metadata": {
      "keywords": "<string>",
      "viewport": "<string>",
      "description": "<string>",
      "format-detection": "<string>"
    }
  }
}
{
"code": 123,
"message": "<string>"
}

Authorizations

Authorization
string
header
required

Use the following format for authentication: Bearer

Body

application/json
url
string
required

The URL to retrieve

timeout
integer
default:20

Request timeout in seconds. Default is 20

no_cache
boolean
default:false

Whether to disable caching (true/false). Default is false

return_format
string
default:markdown

Return format (e.g., markdown, text). Default is markdown

retain_images
boolean
default:true

Whether to retain images (true/false). Default is true

no_gfm
boolean
default:false

Whether to disable GitHub Flavored Markdown (true/false). Default is false

keep_img_data_url
boolean
default:false

Whether to keep image data URLs (true/false). Default is false

with_images_summary
boolean
default:false

Whether to include image summary (true/false). Default is false

Whether to include links summary (true/false). Default is false

Response

Processing successful

id
string

Task ID

created
integer<int64>

Request creation time as a Unix timestamp in seconds

request_id
string

Client-provided unique identifier to distinguish requests. If not provided, the platform will generate one.

model
string

Model code

reader_result
object

Web reading result