Crawl a page

Fetch one page now and get its content with a receipt: where and when it was fetched, what robots.txt and the site's AI-use signals said, a content hash and the cost.
POST/v1/crawls
Open as Markdown
On this page

Price

Pricepage
Live
$0.00011
Standard fetch
$0.00011
Rendered fetch
$0.0011
Protected fetch
$0.003

Billed at the level that delivered the page.

Description

Runs inline and returns one task. The HTTP status follows the task: 200 completed (also for a fetched page that isn't real content, billed $0), 451 blocked by robots.txt, 502 when the site couldn't be fetched. A body with targets instead of url is treated as POST /v1/crawls/batch.

Billing. One page at the price of the fetch level that delivered it (Standard $0.00011, Rendered $0.0011, Protected $0.003). Blocked, failed and non-substantive pages cost $0.

Request

Endpoint
POST https://api.dataforgaio.com/v1/crawls
Authentication
HTTP Basic auth: any login, with your dg_ API key as the password. A Bearer header with the key also works. Create a key.
Body
JSON object

Fields

  • urlstringrequired
    The page to fetch: an absolute http(s) URL on a public host.
    Max2000Examplehttps://summitrunning.example/trail-shoes
  • auto_upgradebooleanoptional
    Lets a blocked page move to a higher fetch level, billed at the level that delivered it. false stops at the requested level and returns the failure at $0.
    DefaulttrueExampletrue
  • max_levelstringoptional
    The highest fetch level Auto-upgrade may use.
    DefaultprotectedOne ofstandardrenderedprotectedExamplerendered
  • max_costnumber|nulloptional
    The most one page may cost, in USD, up to 6 decimal places. The wallet check reserves this instead of the worst-case price, and a fetch never upgrades past it.
    Min0Example0.002
  • output_formatstringoptional
    What content holds: Markdown text, the page HTML, or a JSON object of the page's title, text and metadata.
    DefaultmarkdownOne ofmarkdownhtmljsonExamplemarkdown
  • enginestringoptional
    The level to start at. rendered runs JavaScript from the first fetch and needs max_level rendered or protected. browser is accepted as an older name for rendered.
    DefaultstandardOne ofstandardrenderedExamplestandard
  • render_jsbooleanoptional
    true is the same as engine: rendered.
    Defaultfalse
  • include_receiptbooleanoptional
    Include the receipt on each task.
    DefaulttrueExampletrue
  • project_idstring|nulloptional
    A project in your organization to file this under. Leave it out for the default project.
    Example5b2f8c1e-3d4a-4e6f-9a0b-1c2d3e4f5a6b

Response

Shape: Native. Expand a field to see its children; every field has a link anchor.

  • statusstring
    Always ok for a 2xx response.
    Exampleok
  • costnumber
    Sum of the task costs, USD.
    Example0.00011
  • Number of tasks.
    Example1
  • Tasks that failed or were blocked.
    Example0
  • tasksarray<object>
    The tasks.
    Show 39 child fields
    • idstring
      Task id, cr_…. Use it with GET /v1/crawls/{id}.
      Examplecr_8cbb5b5c8e155c82995945f93cdad009
    • statusstring
      Task state.
      One ofcompletedfailedblockedqueuedprocessingExamplecompleted
    • HTTP-style code for this task: 200 completed, 451 blocked by robots.txt, 422 invalid target or over max_cost, 502 upstream error, 503 level unavailable, 202 queued or processing.
      Example200
    • Plain-language status. For a completed but non-substantive page, says why.
      ExampleOk.
    • costnumber
      What this task was charged, USD.
      Example0.00011
    • fetch_levelstring|null
      The level that delivered the page. Null until a page was delivered.
      One ofstandardrenderedprotectedExamplestandard
    • upgradedboolean
      True when Auto-upgrade moved past the requested level.
      Examplefalse
    • Why it upgraded, for example 403 at standard. Empty when it didn't.
    • contentobject
      The page. Present when status is completed.
      Show 4 child fields
      • titlestring
        Page title.
        ExampleTrail running shoes
      • markdownstring
        Page as Markdown, for output_format: markdown.
        Example# Trail running shoes Every trail shoe we stock comes with free gait analysis and 60-day returns.
      • htmlstring
        Page HTML, for output_format: html.
      • jsonobject
        Title, text and metadata, for output_format: json.
    • errorobject
      Present when status is failed or blocked.
      Show 2 child fields
      • Same as status_code.
      • codestring
        Error code, for example blocked_by_policy or upstream_error.
    • receiptobject
      Provenance and cost. Present unless include_receipt is false.
      Show 22 child fields
      • Receipt id, rc_….
        Examplerc_8cbb5b5c8e155c82995945f93cdad009
      • The URL that was requested.
        Examplehttps://summitrunning.example/trail-shoes
      • fetched_atstring|null
        When the page was fetched, ISO 8601 UTC. Null when it wasn't fetched.
        Example2026-12-03T10:42:18Z
      • http_statusinteger|null
        HTTP status the site returned.
        Example200
      • content_sha256string|null
        SHA-256 of the content we returned, so you can prove what you saw.
        Example9f2c4a1b7e0d3c58a6b1f4e2d7c9a0b3e5f8d1c4a7b0e3f6d9c2a5b8e1f4d7c0
      • content_checkstring|null
        Whether the page is real content: substantive, or why not.
        One ofsubstantiveblockedlogin_wallerror_pageempty_shellExamplesubstantive
      • Signals behind a non-substantive verdict.
        Example[]
      • robots_txtstring|null
        What the site's robots.txt says about this path for our crawler.
        One ofalloweddisallowednot_foundunreachableExampleallowed
      • ai_use_signalstring|null
        The site's declared stance on AI use, from robots.txt, meta tags, headers and its terms, for example none_declared or opt_out.
        Examplenone_declared
      • Where each AI-use signal was found.
        Example{}
      • enginestring
        The level you asked to start at.
        One ofstandardrenderedExamplestandard
      • fetch_levelstring|null
        The level that delivered the page. Null until a page was delivered.
        One ofstandardrenderedprotectedExamplestandard
      • upgradedboolean
        True when Auto-upgrade moved past the requested level.
        Examplefalse
      • Why it upgraded, for example 403 at standard. Empty when it didn't.
      • Same as fetch_level, or engine when nothing was delivered.
        Examplestandard
      • unit_cost_usdnumber|null
        What this page was charged, in USD. Null until the task has run.
        Example0.00011
      • billed_usdnumber|null
        Same as unit_cost_usd.
        Example0.00011
      • billed_pagesinteger|null
        1 when the page was billed, 0 when it cost nothing.
        Example1
      • cost_breakdownobject|null
        The charge split into the base page price and what an upgrade added.
        Show 2 child fields
        • basenumber
          Base page price, USD.
          Example0.00011
        • upgradenumber
          Added by Auto-upgrade, USD.
          Example0
      • currencystring
        Always USD.
        ExampleUSD

Errors

CodeWhen
invalid_requestHTTP 400. The body failed validation. error.details maps each field to its problem.
unauthorizedHTTP 401. Missing, malformed or revoked API key.
balance_requiredHTTP 402. Your wallet balance is below the most this request could cost. Nothing ran.
invalid_targetHTTP 422. A URL is not an absolute public http(s) URL. Nothing was fetched.
rate_limitedHTTP 429. Too many requests, or too many requests in flight for your organization. Retry-After says when to retry.
upstream_errorHTTP 502. The target or search timed out or returned an error we couldn't recover from. You weren't billed.
Tasks that end in an error are not billed. All status codes