/scrapeScrape a web page
Scrape
Cost / request
$0.01
Response format
JSON
Protocol
REST
About this endpoint
Scrape a single web page through agntdata and get its content back as clean markdown, HTML, links, a summary, a screenshot, or schema-driven structured JSON. Handles JavaScript-rendered pages. Ideal when an agent needs the actual content of a known URL.
Use cases
Reading a specific page an agent already has the URL for
Extracting structured fields from a page via a JSON schema
Feeding fresh page content into a RAG pipeline
Parameters
bodyRequest Bodyrequired
Content type: application/json
{
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string",
"format": "uri",
"description": "The URL to scrape (must be a publicly reachable http(s) URL)."
},
"formats": {
"type": "array",
"description": "Output formats to return. Each entry is either a string preset or an object form. String presets: 'markdown' (default), 'summary', 'html', 'rawHtml', 'links', 'images'. Object forms include { type: 'json', schema, prompt } for structured extraction, { type: 'screenshot', fullPage, quality } for an image, and { type: 'changeTracking', modes } for diffs. Defaults to ['markdown'] when omitted.",
"items": {
"oneOf": [
{
"type": "string",
"enum": [
"markdown",
"summary",
"html",
"rawHtml",
"links",
"images"
]
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"json",
"screenshot",
"changeTracking"
]
},
"schema": {
"type": "object",
"description": "JSON schema describing the structured data to extract (for type 'json')."
},
"prompt": {
"type": "string",
"description": "Natural-language extraction prompt (for type 'json')."
},
"fullPage": {
"type": "boolean",
"description": "Capture the full scrollable page (for type 'screenshot')."
},
"modes": {
"type": "array",
"items": {
"type": "string",
"enum": [
"git-diff",
"json"
]
},
"description": "Change-tracking modes (for type 'changeTracking')."
}
}
}
]
}
},
"onlyMainContent": {
"type": "boolean",
"description": "Return only the main content of the page, excluding navs, headers, and footers.",
"default": true
},
"includeTags": {
"type": "array",
"items": {
"type": "string"
},
"description": "Only include content within these HTML tags / CSS selectors."
},
"excludeTags": {
"type": "array",
"items": {
"type": "string"
},
"description": "Exclude content within these HTML tags / CSS selectors."
},
"maxAge": {
"type": "integer",
"description": "Return cached content up to this age in milliseconds (faster, cheaper). Default 172800000 (2 days).",
"minimum": 0
},
"waitFor": {
"type": "integer",
"description": "Milliseconds to wait for the page to render before scraping.",
"minimum": 0,
"default": 0
},
"mobile": {
"type": "boolean",
"description": "Emulate a mobile device.",
"default": false
},
"timeout": {
"type": "integer",
"description": "Request timeout in milliseconds (1000-300000). Default 60000.",
"minimum": 1000,
"maximum": 300000
},
"parsers": {
"type": "array",
"items": {},
"description": "PDF parsing configuration."
},
"proxy": {
"type": "string",
"enum": [
"basic",
"enhanced",
"auto"
],
"description": "Proxy / anti-bot mode. 'auto' (default) escalates only on failure; 'enhanced' forces advanced anti-bot handling and costs more.",
"default": "auto"
},
"location": {
"type": "object",
"description": "Geographic proxy location and language settings.",
"properties": {
"country": {
"type": "string",
"description": "ISO 3166-1 alpha-2 country code."
},
"languages": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}Responses
The scraped page content in the requested formats.
{
"type": "object"
}Agent / Developer Schema
Machine-readable formats for integrating this endpoint into AI agents and toolchains.
{
"operationId": "scrape",
"method": "post",
"path": "/scrape",
"summary": "Scrape a web page",
"description": "Fetches a single URL and returns its content in the requested formats. By default returns clean main-content markdown. Use the `json` format with a `schema` to extract structured data, or request `html`, `links`, `summary`, or a `screenshot`. Handles JavaScript-rendered pages.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string",
"format": "uri",
"description": "The URL to scrape (must be a publicly reachable http(s) URL)."
},
"formats": {
"type": "array",
"description": "Output formats to return. Each entry is either a string preset or an object form. String presets: 'markdown' (default), 'summary', 'html', 'rawHtml', 'links', 'images'. Object forms include { type: 'json', schema, prompt } for structured extraction, { type: 'screenshot', fullPage, quality } for an image, and { type: 'changeTracking', modes } for diffs. Defaults to ['markdown'] when omitted.",
"items": {
"oneOf": [
{
"type": "string",
"enum": [
"markdown",
"summary",
"html",
"rawHtml",
"links",
"images"
]
},
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"json",
"screenshot",
"changeTracking"
]
},
"schema": {
"type": "object",
"description": "JSON schema describing the structured data to extract (for type 'json')."
},
"prompt": {
"type": "string",
"description": "Natural-language extraction prompt (for type 'json')."
},
"fullPage": {
"type": "boolean",
"description": "Capture the full scrollable page (for type 'screenshot')."
},
"modes": {
"type": "array",
"items": {
"type": "string",
"enum": [
"git-diff",
"json"
]
},
"description": "Change-tracking modes (for type 'changeTracking')."
}
}
}
]
}
},
"onlyMainContent": {
"type": "boolean",
"description": "Return only the main content of the page, excluding navs, headers, and footers.",
"default": true
},
"includeTags": {
"type": "array",
"items": {
"type": "string"
},
"description": "Only include content within these HTML tags / CSS selectors."
},
"excludeTags": {
"type": "array",
"items": {
"type": "string"
},
"description": "Exclude content within these HTML tags / CSS selectors."
},
"maxAge": {
"type": "integer",
"description": "Return cached content up to this age in milliseconds (faster, cheaper). Default 172800000 (2 days).",
"minimum": 0
},
"waitFor": {
"type": "integer",
"description": "Milliseconds to wait for the page to render before scraping.",
"minimum": 0,
"default": 0
},
"mobile": {
"type": "boolean",
"description": "Emulate a mobile device.",
"default": false
},
"timeout": {
"type": "integer",
"description": "Request timeout in milliseconds (1000-300000). Default 60000.",
"minimum": 1000,
"maximum": 300000
},
"parsers": {
"type": "array",
"items": {},
"description": "PDF parsing configuration."
},
"proxy": {
"type": "string",
"enum": [
"basic",
"enhanced",
"auto"
],
"description": "Proxy / anti-bot mode. 'auto' (default) escalates only on failure; 'enhanced' forces advanced anti-bot handling and costs more.",
"default": "auto"
},
"location": {
"type": "object",
"description": "Geographic proxy location and language settings.",
"properties": {
"country": {
"type": "string",
"description": "ISO 3166-1 alpha-2 country code."
},
"languages": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
},
"example": {
"url": "https://example.com",
"formats": [
"markdown"
]
}
}
}
},
"responses": [
{
"statusCode": "200",
"description": "The scraped page content in the requested formats.",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
},
{
"statusCode": "400",
"description": "Bad request — missing `url` or invalid parameter."
},
{
"statusCode": "401",
"description": "Unauthorized."
},
{
"statusCode": "402",
"description": "Insufficient balance."
},
{
"statusCode": "429",
"description": "Too many requests."
},
{
"statusCode": "5XX",
"description": "Upstream error."
}
]
}Pricing
$0.01per successful request
Credits are deducted from your agntdata balance on each successful API call. Failed requests (4xx/5xx) are not charged.
Related endpoints
Start using this endpoint
Generate your API key and make your first call in under a minute. Free tier available with transparent pricing.
web scraping APIscrape to markdown APIstructured web extraction APIAI agents web data APIweb scraping APIweb search API for AI agentsscrape to markdown API