API reference
Content
Extract metadata, links, HTML, Markdown and sitemap from any rendered webpage.
http://localhost:4000/v1/content- Credit cost
- 1 per successful request
- Async
- Supported (is_async)
- 404 billed
- No
- Plans
- All plans
Authenticate with the x-api-key header. See authentication and credits & billing.
Parameters
Basics
| Parameter | Description |
|---|---|
urlstringrequired | The URL of the webpage to capture. Example: |
Output
| Parameter | Description |
|---|---|
include_htmlboolean | Include the rendered HTML. |
include_markdownboolean | Include clean Markdown. |
include_sitemapboolean | Include the site's sitemap URLs. |
use_defuddleboolean | Run Defuddle to keep only the main content (removes nav, sidebars, footers, comments). |
Page
| Parameter | Description |
|---|---|
remove_selectorsstring | Comma-separated CSS selectors to hide before capturing (e.g. ads, popups). |
remove_cookie_bannersboolean | Automatically remove cookie banners before capturing. |
remove_adsboolean | Automatically remove ads before capturing. |
block_resourcesenum[] | Comma-separated list of resource types to block (e.g. image,stylesheet,font). Values (comma-separated): |
block_urlsstring | Comma-separated URL patterns to block (e.g. analytics,tracking,.example.com/). |
Timing
| Parameter | Description |
|---|---|
delaynumber | Delay in seconds before capturing (max 30). |
wait_untilenum[] | When to consider navigation finished. Default: Values (comma-separated): |
wait_for_selectorstring | Wait for a specific element to appear before capturing. |
Network
| Parameter | Description |
|---|---|
proxystring | Proxy to route the request through (http://user:pass@host:port, https:// or socks5://). |
stealthboolean | Stealth mode: fingerprint hardening and user-agent rotation to reduce bot detection (paid plans). |
user_agentstring | Override the browser user agent. |
headersjson | Extra HTTP headers as a JSON object. |
cookiesjson | Cookies to set, as a JSON array of {name,value,domain?,path?}. |
Cache
| Parameter | Description |
|---|---|
cacheboolean | Cache the response at the edge. |
cache_ttlnumber | Custom cache TTL in seconds (max 2,592,000 = 30 days, default 86,400). |
Global parameters
Accepted by every billable endpoint. Details in Global parameters.
| Parameter | Description |
|---|---|
soft_failboolean | Return HTTP 200 even when an error occurs, with the message in Default: |
is_asyncboolean | Process asynchronously; returns a Default: |
fieldsstring | Comma-separated list of response fields to keep (dot notation for nested). |
webhook_urlstring | With is_async=true, POST the finished job to this URL (signed, paid plans). |
Code examples
curl "http://localhost:4000/v1/content?url=https%3A%2F%2Fexample.com&include_markdown=true" \
-H "x-api-key: $SCREENSHOTDUDE_API_KEY"Responses
200 — application/json
{
"success": true,
"data": {
"metadata": {
"title": "Acme — Project management for remote teams",
"description": "Plan sprints, track work and ship faster with Acme.",
"favicon": "https://acme.example/favicon.ico",
"ogImage": "https://acme.example/og.png",
"ogTitle": "Acme — Project management for remote teams",
"ogDescription": "Plan sprints, track work and ship faster.",
"canonical": "https://acme.example/",
"lang": "en",
"keywords": [
"project management",
"remote teams",
"kanban"
],
"author": "Acme Inc.",
"schemaOrg": [
{
"@type": "Organization",
"name": "Acme Inc.",
"url": "https://acme.example"
}
]
},
"links": {
"internal": [
"https://acme.example/pricing",
"https://acme.example/blog",
"https://acme.example/login"
],
"external": [
"https://status.acme-hosting.example"
],
"social": [
"https://x.com/acme",
"https://www.linkedin.com/company/acme"
]
},
"markdown": "# Project management for remote teams\n\nPlan sprints, track work and ship faster..."
}
}202 — with is_async=true
{
"success": true,
"job_id": "job_4f8k2m9q1x7c3v5b6n0z8l2p",
"status": "Queued"
}{ success, data: { metadata, links, html?, markdown?, sitemap? } }| Field | Type | Description |
|---|---|---|
data.metadata.title |
string | Document title. |
data.metadata.description |
string | Meta description. |
data.metadata.favicon |
string | Absolute favicon URL. |
data.metadata.ogImage |
string | Open Graph image. |
data.metadata.ogTitle |
string | Open Graph title. |
data.metadata.ogDescription |
string | Open Graph description. |
data.metadata.canonical |
string | Canonical URL. |
data.metadata.lang |
string | Document language (<html lang>). |
data.metadata.keywords |
string[] | Meta keywords. |
data.metadata.author |
string | Meta author. |
data.metadata.schemaOrg |
object[] | Parsed JSON-LD (schema.org) blocks. |
data.links.internal |
string[] | Absolute links on the same domain. |
data.links.external |
string[] | Links to other domains. |
data.links.social |
string[] | Links to social networks. |
data.html |
string | Rendered HTML (include_html=true). |
data.markdown |
string | Markdown (include_markdown=true; main content only with use_defuddle=true). |
data.sitemap |
string[] | URLs from the site's sitemap (include_sitemap=true). |
Missing values are returned as null or empty arrays. Use fields to keep only what you need, e.g. fields=markdown,metadata.title.
Errors
Errors return JSON { "error": "…" }. Failed requests are never billed. Full list in Status codes.
| Status | Meaning |
|---|---|
| 400 | Missing or invalid parameter (e.g. invalid URL, unsupported format, private network target) |
| 401 | Invalid, inactive or expired API key; plan rate limit (Rate limit exceeded: …) or key quota (…: quota daily) |
| 403 | IP temporarily blocked after repeated authentication failures; endpoint not included in your plan |
| 402 | Payment required, You have open invoices: … or Insufficient credits: X required, Y available |
| 404 | Target page not found — not billed |
| 413 | Result too large (e.g. extremely tall full-page capture) |
| 500 | Rendering failed or timed out (60 s) — not billed; retry or use is_async=true |