Quick Start
Send your first WebFetch request and understand the default response behavior.
Use Lexmount WebFetch when you want structured content from a public web page without building your own fetch, rendering, and extraction pipeline.
The most practical starting point is POST /v1/extract.
Authentication
- The API is currently in internal testing
- External requests must include both
X-API-KeyandX-Project-Id - Create or copy them from https://browser.lexmount.cn/settings/api-keys
- For overseas access, use https://browser.lexmount.com/settings/api-keys and replace the endpoint with
https://api.lexmount.com
Send Your First Request
API_KEY='<your-api-key>'
PROJECT_ID='<your-project-id>'
curl -sS -X POST https://api.lexmount.cn/v1/extract \
-H 'Content-Type: application/json' \
-H "X-API-Key: $API_KEY" \
-H "X-Project-Id: $PROJECT_ID" \
-d '{
"extract": {
"url": "https://example.com"
}
}'Typical response:
{
"request_id": "01964d0f-5f3a-7c3d-8a41-1234567890ab",
"result": {
"url": "https://example.com",
"final_url": "https://example.com",
"status_code": 200,
"title": "Example Domain",
"description": "Example Domain",
"main_text": "Example Domain This domain is for use in illustrative examples in documents.",
"engine": "http",
"dom_id": "dom_123"
},
"metadata": {
"dom_id": "dom_123",
"server_elapsed_ms": 1234
}
}Every JSON response also includes a top-level request_id. The same value is returned in the X-Request-ID response header for log correlation and support debugging.
What You Get
POST /v1/extract is the all-in-one endpoint. It handles:
- page fetching
- template matching
- background generation when needed
- final structured extraction
Common fields in result include:
titledescriptionmain_textfinal_urlauthorpublish_timelinksimagesenginedom_id
Top-level debugging fields:
request_id
When To Use Dump DOM
Use POST /v1/dom/dump when you need the captured HTML itself, want to inspect rendering output, or want to reuse a dom_id in a later extraction request.
curl -sS -X POST https://api.lexmount.cn/v1/dom/dump \
-H 'Content-Type: application/json' \
-H "X-API-Key: $API_KEY" \
-H "X-Project-Id: $PROJECT_ID" \
-d '{"url":"https://example.com"}' \
| jq '{final_url, engine, dom_id, html_len:(.html|length)}'Optional Debug Fields
POST /v1/extract does not return trace or raw_dom by default.
- If you need workflow diagnostics, see Enable Trace
- If you need
raw_domin the response, see Return Raw DOM
Next
- See All-in-One Extract for the full
/v1/extractrequest and response shape - See Dump DOM for
/v1/dom/dumpoptions and reuse patterns - See Common Errors for troubleshooting guidance
Lexmount Docs