---
title: "API Documentation"
description: "Complete API reference for WebScraping.AI. Learn how to scrape websites, extract data with AI, and integrate with your applications."
url: https://webscraping.ai/docs#rules
markdown_index: https://webscraping.ai/llms.txt
---
## Rules & Pricing

- Requests start at 1 credit (no JS, datacenter proxy). JS rendering, residential and stealth proxies cost more, and AI extraction adds +5 credits. Google search results (`/serp`) are 15 credits per results page and the price of structured data (`/data`) varies depending on the site — see the table below.
- Requests can take up to 30 seconds. Use the `timeout` parameter to control duration.
- Failed requests are free. You're only charged for successful responses. For `/data`, pages that come back `parse_failed` or `not_found` count as successful and are charged; only failed fetches are free.
- Credits come from a monthly subscription plan, pay-as-you-go top-ups (from $20, $1 = 5,000 credits, valid 12 months), or both — pay-as-you-go credits are used after your plan quota runs out. See [pricing](https://webscraping.ai/#pricing).

##### Credit Cost Summary

| Configuration | Credits | Notes |
| --- | --- | --- |
| Basic (no JS, datacenter proxy) | **1** | Fastest, for static sites |
| With JS rendering | **5** | Default setting, headless Chrome |
| Residential proxy (no JS) | **10** | For anti-bot protected sites |
| Residential proxy + JS | **25** | Maximum compatibility |
| Stealth proxy | **50** | For sites with the strongest anti-bot protection |
| AI endpoints (/ai/question, /ai/fields) | **+5** | Added on top of the proxy/JS cost above |
| Search results ([/serp](https://webscraping.ai/docs/serp.md)) | **15** | Per results page returned (`pages` fetches up to 5 in one call); proxy/JS settings don't apply |
| Structured data ([/data](https://webscraping.ai/docs/data.md)) | Varies depending on the site | Per page, including pages that parse empty or don't exist. Learning a new site's structure is free |

All costs are per successful request. Failed requests are free.
