Skip to content
Start here

Get crawl result.

client.browserRendering.crawl.get(stringjobId, CrawlGetParams { account_id, cacheTTL, cursor, 2 more } params, RequestOptionsoptions?): CrawlGetResponse { id, browserSecondsUsed, finished, 5 more }
GET/accounts/{account_id}/browser-rendering/crawl/{job_id}

Returns the result of a crawl job.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Browser Rendering WriteBrowser Rendering Read
ParametersExpand Collapse
jobId: string

Crawl job ID.

minLength1
params: CrawlGetParams { account_id, cacheTTL, cursor, 2 more }
account_id: string

Path param: Account ID.

cacheTTL?: number

Query param: Cache TTL default is 5s. Set to 0 to disable.

maximum86400
cursor?: number

Query param: Cursor for pagination.

limit?: number

Query param: Limit for pagination.

status?: "queued" | "errored" | "completed" | 3 more

Query param: Filter by URL status.

One of the following:
"queued"
"errored"
"completed"
"disallowed"
"skipped"
"cancelled"
ReturnsExpand Collapse
CrawlGetResponse { id, browserSecondsUsed, finished, 5 more }
id: string

Crawl job ID.

browserSecondsUsed: number

Total seconds spent in browser so far.

finished: number

Total number of URLs that have been crawled so far.

records: Array<Record>

List of crawl job records.

metadata: Metadata { status, url, title }
status: number

HTTP status code of the crawled page.

url: string

Final URL of the crawled page.

title?: string

Title of the crawled page.

status: "queued" | "errored" | "completed" | 3 more

Current status of the crawled URL.

One of the following:
"queued"
"errored"
"completed"
"disallowed"
"skipped"
"cancelled"
url: string

Crawled URL.

html?: string

HTML content of the crawled URL.

json?: Record<string, unknown>

JSON of the content of the crawled URL.

markdown?: string

Markdown of the content of the crawled URL.

skipped: number

Total number of URLs that were skipped due to include/exclude/subdomain filters. Skipped URLs are included in records but are not counted toward total/finished.

status: string

Current crawl job status.

total: number

Total current number of URLs in the crawl job.

cursor?: string

Cursor for pagination.

Get crawl result.

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

const crawl = await client.browserRendering.crawl.get('x', { account_id: 'account_id' });

console.log(crawl.id);
{
  "result": {
    "id": "id",
    "browserSecondsUsed": 0,
    "finished": 0,
    "records": [
      {
        "metadata": {
          "status": 0,
          "url": "url",
          "title": "title"
        },
        "status": "queued",
        "url": "url",
        "html": "html",
        "json": {
          "foo": {}
        },
        "markdown": "markdown"
      }
    ],
    "skipped": 0,
    "status": "status",
    "total": 0,
    "cursor": "cursor"
  },
  "success": true,
  "errors": [
    {
      "code": 0,
      "message": "message"
    }
  ]
}
Returns Examples
{
  "result": {
    "id": "id",
    "browserSecondsUsed": 0,
    "finished": 0,
    "records": [
      {
        "metadata": {
          "status": 0,
          "url": "url",
          "title": "title"
        },
        "status": "queued",
        "url": "url",
        "html": "html",
        "json": {
          "foo": {}
        },
        "markdown": "markdown"
      }
    ],
    "skipped": 0,
    "status": "status",
    "total": 0,
    "cursor": "cursor"
  },
  "success": true,
  "errors": [
    {
      "code": 0,
      "message": "message"
    }
  ]
}