Web Scraping API

Scrape any website with CSS selectors, XPath, or AI — with built-in proxy rotation, JS rendering, and smart retries.

The Agenty Scrape API is a production-grade scraping endpoint for static and JavaScript-rendered sites. Use CSS selectors, XPath, or AI-powered schema detection to pull the data you need, while the API handles rotating proxies, rate limits, retries, and bot-detection countermeasures for you.

Features

Use cases

API examples

Scrape a list of products with CSS selectorsbash
curl -X POST https://api.agenty.ai/v1/scrape \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/products",
    "selectors": {
      "products": {
        "_parent": ".product-card",
        "name": ".title",
        "price": ".price",
        "image": "img@src"
      }
    }
  }'
Scrape with XPath selectorsbash
curl -X POST https://api.agenty.ai/v1/scrape \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/products",
    "selectors": {
      "names": "//h2[@class=\"title\"]/text()",
      "prices": "//span[@class=\"price\"]/text()"
    }
  }'
Scrape a website in Node.jsjavascript
const res = await fetch('https://api.agenty.ai/v1/scrape', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    url: 'https://example.com/products',
    selectors: { name: 'h1', price: '.price' },
  }),
});
console.log(await res.json());
Scrape a website in Pythonpython
import requests

res = requests.post(
    "https://api.agenty.ai/v1/scrape",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "url": "https://example.com/products",
        "selectors": {"name": "h1", "price": ".price"},
    },
)
print(res.json())

How Agenty compares

FeatureAgentyScrapingBeeScraperAPIZenRows
CSS selector supportYesYesYesYes
XPath supportYesYesLimitedYes
AI schema detectionYesNoNoNo
JavaScript renderingYesYesYesYes
Free tierYesYesYesYes

Frequently asked questions

What is the Web Scraping API?

The Agenty Scrape API lets you extract data from any website using CSS selectors, XPath, or AI-powered schema detection. It handles JavaScript rendering, rotating proxies, pagination, and retries automatically.

Do I need to manage proxies?

No. We manage a global rotating proxy pool. Optionally pass proxyCountry to route requests through a specific region.

Can I scrape single-page apps (SPAs)?

Yes. We use headless Chrome to render JavaScript before extraction. React, Vue, and Angular single-page apps are fully supported.

How do you handle bot detection?

We use rotating residential proxies, realistic browser headers, and randomised delays to minimise detection. For tougher targets, we offer CAPTCHA-solving add-ons.

Is there a free tier?

Yes. All accounts start with free credits. Visit our pricing page for current limits.

Web scraping with AI

Start scraping data from any website using the Agenty's web scraping agents with AI.

No credit card required
14-day free trial
Cancel anytime
Log inSign up