API
Tools

Scrape

POST/scrape

Scrape a webpage and return the text content synchronously — the only endpoint here that doesn't return a run to poll. The response uses the request_status format.

Quick example

  curl -X POST https://api.riveterhq.com/v1/scrape \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'

Credit costs

  • With proxy: 0.30 credits
  • Without proxy: 0.10 credits
  • From cache: 0.01 credits

Proxy usage

Scraping is not guaranteed to succeed without a proxy. Some websites may block requests or require specific geographic locations. To use a proxy, include proxy_country_code with a two-character country code (e.g. 'us', 'gb', 'de').

Caching

Recently scraped pages are cached to save credits (0.01 credits on a cache hit). Set skip_cache: true to always fetch fresh content.

Request bodyrequired

urlstring urirequired

The URL to scrape

proxy_country_codestring

Optional two-character country code for proxy (e.g. 'us', 'gb', 'de')

Pattern ^[a-z]{2}$
skip_cacheboolean

Set to true to bypass cache and always fetch fresh content

Default false
estimate_costEstimateCostParam

Validate and price the request without running or charging anything; the 200 response is the credit estimate (EstimateCostResult).

Default false
max_creditsMaxCreditsParam

Credit ceiling. Refused with 422 credit_cap_exceeded (nothing charged) when the estimate's maximum exceeds it.

Min 0

Responses

200Webpage scraped successfully (or, with estimate_cost, the credit estimate only — minimum is the cache-hit price, maximum depends on proxy_country_code)
One of
  • ScrapeResponse model →
    request_statusstring
    One of success
    textstring

    The extracted text content from the webpage

    urlstring uri

    The URL that was scraped

    base_url_for_linksstring

    The base URL for resolving relative links

    status_codeinteger

    The HTTP status code returned by the server

    possibly_blockedboolean

    Present when the page may be blocked by anti-scraping measures

    credit_usednumber

    The number of credits consumed

    credit_detailCreditDetail

    The estimate made at kickoff next to what has been charged so far. estimate is null for runs started before estimates existed. Estimates and credit errors add credits_remaining and sufficient_credits.

    Attributes
    estimateone ofrequired
    Attributes
    One of
    • CreditEstimate model →
      minimumnumberrequired

      Least the run can cost

      expectednumber

      Likely cost from past runs of the same config; absent without history

      typicalobject

      Recent p25–p75 settled range for builds of this size; absent without a dataset build estimate

      Attributes
      lownumberrequired
      highnumberrequired
      maximumnumberrequired

      Most the run can cost

      upfrontnumber

      Credits taken at kickoff when charged_upfront is true; 0 when the charge accrues as work completes

      charged_upfrontbooleanrequired

      true when a deposit is taken at kickoff (dataset builds, extractions); false when credits accrue as work completes

    • null
    credits_usednumberrequired

    Credits charged so far (same value as the top-level credits_used)

    credits_remainingnumber

    Account balance. Only on estimates and credit errors.

    sufficient_creditsboolean

    Whether the balance covers estimate.maximum. Only on estimates and credit errors.

    riveter_app_linkstring uri

    Direct link to view this scrape in the Riveter application

  • EstimateCostResult model →
    estimate_costbooleanrequired
    One of true
    typestringrequired

    What would have been charged for (monitor = one scheduled run of the monitor)

    One of enrichment dataset_build extraction_discovery extraction monitor scrape quick_search search_agent
    credit_detailCreditDetailrequired

    The estimate made at kickoff next to what has been charged so far. estimate is null for runs started before estimates existed. Estimates and credit errors add credits_remaining and sufficient_credits.

    Attributes
    estimateone ofrequired
    Attributes
    One of
    • CreditEstimate model →
      minimumnumberrequired

      Least the run can cost

      expectednumber

      Likely cost from past runs of the same config; absent without history

      typicalobject

      Recent p25–p75 settled range for builds of this size; absent without a dataset build estimate

      Attributes
      lownumberrequired
      highnumberrequired
      maximumnumberrequired

      Most the run can cost

      upfrontnumber

      Credits taken at kickoff when charged_upfront is true; 0 when the charge accrues as work completes

      charged_upfrontbooleanrequired

      true when a deposit is taken at kickoff (dataset builds, extractions); false when credits accrue as work completes

    • null
    credits_usednumberrequired

    Credits charged so far (same value as the top-level credits_used)

    credits_remainingnumber

    Account balance. Only on estimates and credit errors.

    sufficient_creditsboolean

    Whether the balance covers estimate.maximum. Only on estimates and credit errors.

400The request is malformed or names a conflicting parameter combination
errorobjectrequired
Attributes
typestringrequired

Machine-readable error type (bad_request, not_found, forbidden, feature_not_enabled, duplicate_run_key, insufficient_credits, credit_cap_exceeded, validation, not_implemented, ...)

messagestringrequired

Human-readable explanation

detailsany

Optional extra context (e.g. per-field validation errors)

credit_detailCreditDetail

The estimate made at kickoff next to what has been charged so far. estimate is null for runs started before estimates existed. Estimates and credit errors add credits_remaining and sufficient_credits.

Attributes
estimateone ofrequired
Attributes
One of
  • CreditEstimate model →
    minimumnumberrequired

    Least the run can cost

    expectednumber

    Likely cost from past runs of the same config; absent without history

    typicalobject

    Recent p25–p75 settled range for builds of this size; absent without a dataset build estimate

    Attributes
    lownumberrequired
    highnumberrequired
    maximumnumberrequired

    Most the run can cost

    upfrontnumber

    Credits taken at kickoff when charged_upfront is true; 0 when the charge accrues as work completes

    charged_upfrontbooleanrequired

    true when a deposit is taken at kickoff (dataset builds, extractions); false when credits accrue as work completes

  • null
credits_usednumberrequired

Credits charged so far (same value as the top-level credits_used)

credits_remainingnumber

Account balance. Only on estimates and credit errors.

sufficient_creditsboolean

Whether the balance covers estimate.maximum. Only on estimates and credit errors.

401Missing or invalid API key (request_status body — see the AuthError schema)
request_statusstring
One of error
messagestring
error_typestring
One of unauthorized
403The API key's account may not access this resource or endpoint (forbidden), or the account has not migrated to Datasets yet (feature_not_enabled — open Datasets in the app and click "Migrate to Datasets")
errorobjectrequired
Attributes
typestringrequired

Machine-readable error type (bad_request, not_found, forbidden, feature_not_enabled, duplicate_run_key, insufficient_credits, credit_cap_exceeded, validation, not_implemented, ...)

messagestringrequired

Human-readable explanation

detailsany

Optional extra context (e.g. per-field validation errors)

credit_detailCreditDetail

The estimate made at kickoff next to what has been charged so far. estimate is null for runs started before estimates existed. Estimates and credit errors add credits_remaining and sufficient_credits.

Attributes
estimateone ofrequired
Attributes
One of
  • CreditEstimate model →
    minimumnumberrequired

    Least the run can cost

    expectednumber

    Likely cost from past runs of the same config; absent without history

    typicalobject

    Recent p25–p75 settled range for builds of this size; absent without a dataset build estimate

    Attributes
    lownumberrequired
    highnumberrequired
    maximumnumberrequired

    Most the run can cost

    upfrontnumber

    Credits taken at kickoff when charged_upfront is true; 0 when the charge accrues as work completes

    charged_upfrontbooleanrequired

    true when a deposit is taken at kickoff (dataset builds, extractions); false when credits accrue as work completes

  • null
credits_usednumberrequired

Credits charged so far (same value as the top-level credits_used)

credits_remainingnumber

Account balance. Only on estimates and credit errors.

sufficient_creditsboolean

Whether the balance covers estimate.maximum. Only on estimates and credit errors.

422The request is valid but can't be executed (e.g. insufficient_credits, credit_cap_exceeded when max_credits is set, validation failure)
errorobjectrequired
Attributes
typestringrequired

Machine-readable error type (bad_request, not_found, forbidden, feature_not_enabled, duplicate_run_key, insufficient_credits, credit_cap_exceeded, validation, not_implemented, ...)

messagestringrequired

Human-readable explanation

detailsany

Optional extra context (e.g. per-field validation errors)

credit_detailCreditDetail

The estimate made at kickoff next to what has been charged so far. estimate is null for runs started before estimates existed. Estimates and credit errors add credits_remaining and sufficient_credits.

Attributes
estimateone ofrequired
Attributes
One of
  • CreditEstimate model →
    minimumnumberrequired

    Least the run can cost

    expectednumber

    Likely cost from past runs of the same config; absent without history

    typicalobject

    Recent p25–p75 settled range for builds of this size; absent without a dataset build estimate

    Attributes
    lownumberrequired
    highnumberrequired
    maximumnumberrequired

    Most the run can cost

    upfrontnumber

    Credits taken at kickoff when charged_upfront is true; 0 when the charge accrues as work completes

    charged_upfrontbooleanrequired

    true when a deposit is taken at kickoff (dataset builds, extractions); false when credits accrue as work completes

  • null
credits_usednumberrequired

Credits charged so far (same value as the top-level credits_used)

credits_remainingnumber

Account balance. Only on estimates and credit errors.

sufficient_creditsboolean

Whether the balance covers estimate.maximum. Only on estimates and credit errors.