Scrape
/scrapeScrape a webpage and return the text content. This endpoint allows you to extract text content from any public webpage.
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. Using a proxy may be necessary to guarantee results.
To use a proxy, include the proxy_country_code parameter with a two-character country code (e.g., 'us', 'gb', 'de').
Caching
By default, recently scraped pages are cached to save credits. If you hit a recently cached webpage, the scrape only costs 0.01 credits. To always fetch fresh content, set skip_cache to true.
Response
The response includes:
text: The extracted text content from the webpageurl: The URL that was scrapedbase_url_for_links: The base URL for resolving relative linksstatus_code: The HTTP status code returned by the server (e.g., 200, 404, 500)possibly_blocked: (optional) Boolean flag if the page may be blocked by anti-scraping measurescredit_used: The number of credits consumedriveter_app_link: Direct link to view this scrape in the Riveter application
Request bodyrequired
urlstring urirequiredThe URL to scrape
proxy_country_codestringOptional two-character country code for proxy (e.g., 'us', 'gb', 'de')
skip_cachebooleanSet to true to bypass cache and always fetch fresh content
Responses
200Webpage scraped successfully
request_statusstringrequiredStatus of the request
messagestringrequiredHuman-readable message
run_keystringrequiredUnique identifier for this scrape run
dataobjectrequiredAttributes
urlstring urirequiredThe URL that was scraped
textstringrequiredThe extracted text content from the webpage
base_url_for_linksstring urirequiredThe base URL for resolving relative links
status_codeintegerThe HTTP status code returned by the server (e.g., 200, 404, 500)
possibly_blockedbooleanOptional flag indicating if the page may be blocked by anti-scraping measures (captcha, access denied, etc.)
credit_usednumberrequiredNumber of credits consumed (0.01 for cache hit, 0.10 without proxy, 0.30 with proxy)
riveter_app_linkstring urirequiredDirect link to view this scrape in the Riveter application
400Bad request - invalid input or missing required parameters
request_statusstringrequiredStatus of the request
messagestringrequiredHuman-readable error message
errorsarray of stringList of specific error details
error_typestringrequiredStable, snake_case error identifier. duplicate_run / duplicate_run_key are 409 conflicts from starting a run; credit_limit / insufficient_credits are billing failures; the plan_* / discovery_* / invalid_* / locked values are specific to extraction plan endpoints.
401Unauthorized - invalid or missing API key
request_statusstringrequiredStatus of the request
messagestringrequiredHuman-readable error message
errorsarray of stringList of specific error details
error_typestringrequiredStable, snake_case error identifier. duplicate_run / duplicate_run_key are 409 conflicts from starting a run; credit_limit / insufficient_credits are billing failures; the plan_* / discovery_* / invalid_* / locked values are specific to extraction plan endpoints.
403Forbidden - API access not enabled for account
request_statusstringrequiredStatus of the request
messagestringrequiredHuman-readable error message
errorsarray of stringList of specific error details
error_typestringrequiredStable, snake_case error identifier. duplicate_run / duplicate_run_key are 409 conflicts from starting a run; credit_limit / insufficient_credits are billing failures; the plan_* / discovery_* / invalid_* / locked values are specific to extraction plan endpoints.
422Unprocessable entity - validation failed
request_statusstringrequiredStatus of the request
messagestringrequiredHuman-readable error message
errorsarray of stringList of specific error details
error_typestringrequiredStable, snake_case error identifier. duplicate_run / duplicate_run_key are 409 conflicts from starting a run; credit_limit / insufficient_credits are billing failures; the plan_* / discovery_* / invalid_* / locked values are specific to extraction plan endpoints.