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>"
}Web Reader
Reads and parses the content of the specified URL. Supports selectable return formats, cache control, image retention, and summary options.
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
Body
The URL to retrieve
Request timeout in seconds. Default is 20
Whether to disable caching (true/false). Default is false
Return format (e.g., markdown, text). Default is markdown
Whether to retain images (true/false). Default is true
Whether to disable GitHub Flavored Markdown (true/false). Default is false
Whether to keep image data URLs (true/false). Default is false
Whether to include image summary (true/false). Default is false
Whether to include links summary (true/false). Default is false
Response
Processing successful
Task ID
Request creation time as a Unix timestamp in seconds
Client-provided unique identifier to distinguish requests. If not provided, the platform will generate one.
Model code
Web reading result
Hide child attributes
Hide child attributes
Main content parsed from the page (body, images, links, etc.)
Brief description of the page
Page title
Original page URL
External resources referenced by the page
Was this page helpful?