> For the complete documentation index, see [llms.txt](https://docs.iproyal.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.iproyal.com/scraping-tools/web-scraper-api-beta.md).

# Web Scraper API (Beta)

{% hint style="warning" %}
This product is still in beta. For access, please fill out this[ form](https://iproyal.com/web-scraping-api/).
{% endhint %}

Web Scraper API returns the content of [public web pages](https://iproyal.com/acceptable-use-policy/), Google search results, and images through a single HTTPS endpoint. You send the target, and IPRoyal handles proxies, browser rendering, and other technical challenges of collecting public web data.

Billing is based on credits. A successful request costs one credit. A failed request costs nothing.

### What You Can Scrape

| Source      | Use It For                   | You Receive                                          |
| ----------- | ---------------------------- | ---------------------------------------------------- |
| `universal` | Any public web page          | The page HTML, or structured JSON when `parse` is on |
| `google`    | Google search results        | Search results as JSON                               |
| `image`     | An image file at a known URL | The image as a Base64 string                         |

Use Web Scraper API only for public web data, as defined in the [IPRoyal Acceptable Use Policy](https://iproyal.com/acceptable-use-policy/).

### How It Works

1. Your application sends a `POST` request to `https://scrape.iproyal.com/v1/scrape` with the source and the target.
2. IPRoyal loads the target through a proxy, in the country you choose.
3. The response contains the content and the HTTP status the target website returned.
4. One credit is charged if the content was delivered. Otherwise, the credit is returned.

### Credits

* Every source costs the same: one credit per successful request.
* Requests rejected before scraping starts never use credits. This covers validation, authentication, balance, and [concurrency limit](/scraping-tools/web-scraper-api-beta/making-a-request.md#limits) errors.
* When your balance reaches zero, scrape requests return `402 insufficient_credit`.
* Purchase credits in the IPRoyal dashboard.

### Next Steps

* [Making a Request](/scraping-tools/web-scraper-api-beta/making-a-request.md) - send your first request and handle the response
* [API](/scraping-tools/web-scraper-api-beta/api.md) - endpoints, parameters, and error codes
* [Supported Countries](/scraping-tools/web-scraper-api-beta/supported-countries.md) - country codes for `geo_location`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.iproyal.com/scraping-tools/web-scraper-api-beta.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
