Scrape a page
Scrape one URL. Waits up to timeout ms; past it, 202 {id, url}.
/crawl/v1/scrapecurl --request POST \
--url 'https://factget.dev/crawl/v1/scrape' \
--header "Authorization: Bearer $FACTGET_CRAWL_KEY" \
--header 'Content-Type: application/json' \
--data '{
"url": "https://example.com",
"formats": [
"markdown",
"links"
],
"onlyMainContent": true
}'Replace IDs and sample values with your own. Examples are not executed in your browser.
Request body
urlstringrequiredThe public URL to read.
originstring | nullformatsstring[]Choose the output formats you need. Each item must be one of the allowed values.
Allowed:"markdown", "html", "rawHtml", "links", "extract"minItems: 1onlyMainContentbooleanReturn the main page content, excluding common navigation and page furniture.
Default:trueincludeTagsstring[] | nullInclude the matching HTML elements in the result.
maxItems: 50excludeTagsstring[] | nullExclude the matching HTML elements from the result.
maxItems: 50waitForintegerAdditional time to wait for the page, in milliseconds.
Default:0minimum: 0maximum: 30000jsCodestring | nullextractobject | nullShow nested properties
typestringrequired"css", "xpath", "regex"schemaobject | nulltimeoutintegerHow long to wait for the operation, in milliseconds, before returning a job to poll.
Default:60000minimum: 1000maximum: 120000Responses
200Successful Response
The published schema does not define individual response fields for this endpoint. Inspect the returned JSON in your integration.
422Validation Error
detailobject[]Show item properties
locstring | integer[]requiredmsgstringrequiredtypestringrequiredinputobjectctxobjectThe API schema lists the responses above. Long-running operations can also return 202; see async jobs. For application errors, see errors & retries.