Docs
Scrape

Scrape one web page

YouTube video URLs return the timestamped transcript through the normal text formats. Every successful YouTube transcript scrape costs 5 credits.

POST/scrape

YouTube video URLs return the timestamped transcript through the normal text formats. Every successful YouTube transcript scrape costs 5 credits.

AuthorizationBearer <token>

Enter your API key with the bc_ prefix

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

actions?array<>

Browser actions to execute

Itemsitems <= 25
blockAds?boolean

Enable ad-blocking and cookie popup blocking

Defaulttrue
domain?string

Domain to scrape. Normalized to https://domain when url is omitted.

excludeTags?array<string>

CSS selectors to exclude

extractionSchema?

Schema for structured data extraction (used with json format)

formats?array<|||>

Output formats - can be simple strings or format objects with options

Default

[  "markdown"]
headers?

Custom headers

includeTags?array<string>

CSS selectors to include

location?

Location settings

maxAge?number

Cache max age in milliseconds

Default172800000
mobile?boolean

Emulate mobile device for scraping

Defaultfalse
onlyMainContent?boolean

Extract only main content

Defaulttrue
proxy?string

Proxy mode. auto starts direct and escalates only when blocked. basic is an alias for none.

Default"auto"

Value in

  • "none"
  • "basic"
  • "datacenter"
  • "residential"
  • "stealth"
  • "auto"
removeBase64Images?boolean

Remove base64 images from output (keeps alt text)

Defaulttrue
screenshotAsBase64?boolean

Return screenshot/PDF output inline as a base64 data URL instead of an uploaded CDN URL. Default false (a CDN URL is returned).

Defaultfalse
skipTlsVerification?boolean

Skip TLS certificate verification

Defaultfalse
storeInCache?boolean

Store result in cache

Defaulttrue
timeout?number

Request timeout in milliseconds

Default30000
url?string

URL to scrape. Either url or domain is required.

waitFor?number

Wait time before scraping (ms)

Default0
zeroDataRetention?boolean

Reserved for a future zero-data-retention mode. true is currently rejected with 400 ZERO_DATA_RETENTION_NOT_SUPPORTED; omit or use false.

Defaultfalse

Response Body

application/json

curl -X POST "https://example.com/scrape" \  -H "Content-Type: application/json" \  -d '{}'
{  "credits": {    "used": 0  },  "data": {},  "error": "string",  "metadata": {    "authorName": "string",    "authorUrl": "http://example.com",    "contentType": "string",    "durationSeconds": 0,    "durationText": "string",    "language": "string",    "source": "string",    "statusCode": 0,    "thumbnailUrl": "http://example.com",    "timestamp": "2019-08-24T14:15:22Z",    "title": "string",    "url": "http://example.com",    "videoId": "string"  },  "success": true}
Empty
Empty
Empty
Empty
Empty
Empty
Empty