Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

API

Reference for every Web Scraper API endpoint.

Base URL

https://scrape.iproyal.com/v1

All requests use HTTPS. Request and response bodies are JSON.

Authentication

Send your API token in the Authorization header of every request:

Authorization: Bearer <your_api_token>

You can find your token in the IPRoyal dashboard. To replace it, use Token Regenerate.

Endpoints

Method
Endpoint
Description

GET

Your credit balance and limits

POST

Scrape a web page, Google search results, or an image

POST

Replace your API token

GET

Usage totals for a date range or for all time

GET

Individual requests, newest first

Errors

Every error uses the same shape:

Branch your code on error.code. The message is meant for people and can change.

Error Codes

HTTP Status

error.code

Meaning

What to Do

400

invalid_request

The request is not valid. The message names the problem.

Fix the request. Do not retry it unchanged.

401

invalid_token

The API token is missing or not recognized.

Check the Authorization header. After a token change, use the new token.

402

insufficient_credit

Your credit balance is empty.

Purchase credits, then retry.

403

account_suspended

Your account is suspended.

Contact IPRoyal Support.

403

account_disabled

Your account is disabled.

Contact IPRoyal Support.

404

not_found

No image was found at the URL, or the endpoint does not exist.

Check the URL.

413

payload_too_large

The request body is larger than 100 KB.

Send only the documented fields.

422

blocked

The target website's anti-bot protection blocked the request.

Retry later or with another geo_location.

422

no_data_extracted

parse was on, but the page had no structured data to extract.

Retry without parse to get the HTML.

429

concurrency_limit_exceeded

Too many of your scrape requests are running at once.

Wait for a running request to finish. See Limits.

500 or 503

internal_error

A temporary problem on IPRoyal's side.

Retry with backoff.

502

upstream_unavailable

The scrape could not be completed, or usage data could not be read.

Retry with backoff.

503

capacity_exceeded

The service as a whole is at full capacity, regardless of your own limit.

Retry after a few seconds with backoff.

Requests that end in an error are not charged.

Last updated

Was this helpful?