Web Read
The web-reader API extracts a page's main content as Markdown, text or JSON, suitable for subsequent summarization, analysis or question answering with a text model.
Method and Path
http
POST /v1/web-reader/readExample request
bash
curl https://moonnexai.com/v1/web-reader/read \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/article",
"format": "md",
"liteMode": true,
"includeImages": true
}'Common field
| field | Type | Annotations |
|---|---|---|
url | string | URL to read. |
format | string | returns the format. |
liteMode | boolean | Whether to enable a streamlined mode. |
includeImages | boolean | Whether to include pictures. |
onlyCSSSelectors | string[] | Optional. Read only the content of the matching selection. |
waitForCSSSelectors | string[] | Optional. Wait for the specified element to appear before reading. |
Use recommendations
- Search API for the page found, and API for the main text of the given page.
- When the same page is processed on several occasions, it is recommended that the reading results be Cacheed.
- When reading results is longer, a summary can be obtained before subsequent models are called.