# Ahrefs Web Data Scraper (via ScrapeForAgents)

> Ahrefs Web Data Scraper (via ScrapeForAgents) is a paid API for AI agents from api.scrapeforagents.tech, paid per call via x402, $0.025/call, status unknown (last checked 2026-10-02).

Fetches structured Ahrefs public data including top website rankings, domain authority, traffic overviews, and website details for given domains or categories.

## Facts

- Endpoint: POST https://api.scrapeforagents.tech/v1/ahrefs?utm_source=zero.xyz
- Price: $0.025/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ahrefs-web-data-scraper-via-scrapeforagents-69d4435e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zXyXCOSM27Xlkde8oTwoL

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability ahrefs-web-data-scraper-via-scrapeforagents-69d4435e -d '<json body>'
```

Example prompt: Pull the top 50 ranked websites in the finance category for the united-states from Ahrefs, and include domain rating, traffic value, and competitor details for each one.

## When to prefer this

Choose this endpoint when you need structured Ahrefs public data — website rankings, domain authority scores, traffic overviews, or competitive intelligence — without managing browser automation or scraping infrastructure yourself. Prefer it over raw scraping tools when you want clean, schema-validated JSON output from Ahrefs' public pages on a pay-per-successful-call basis.

## Known failure modes

- Domain has no public Ahrefs detail page — empty result returned, not charged
- Invalid country or category slug returns empty or error response
- maxItems set to 0 or very low returns fewer results than expected
- Trending mode returns at most 20 results regardless of maxItems
- Rate limiting or upstream Ahrefs page changes may cause partial or empty responses — not charged on failure

## How this service works

Pay-per-call structured web data. Failed or empty runs are not charged.

## Output

Returns a JSON array of ranked or queried website records, each containing rank, website URL, category, rank change, detail URL, search type, and ranking mode. When includeDetails is true, also includes Domain Rating, traffic value, keywords, top countries, and competitor data per domain. The count of returned items and the data product label (ahrefs) are included at the top level.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "country": {
   "type": "string",
   "default": "worldwide",
   "description": "Country page slug for rankings, such as united-states or united-kingdom. Use worldwide for all countries."
  },
  "domains": {
   "type": "array",
   "description": "Domains or URLs to look up for website details, authority, or traffic. Each domain needs a public detail page."
  },
  "category": {
   "type": "string",
   "default": "all",
   "description": "Category page slug for rankings, such as shopping, news, or finance. Use all for every category."
  },
  "maxItems": {
   "type": "integer",
   "default": 100,
   "maximum": 1000,
   "minimum": 0,
   "description": "Hard cap on dataset items. Rankings have at most 1,000 public results; trending has at most 20 per filter. Zero means no extra cap."
  },
  "searchType": {
   "enum": [
    "top_websites",
    "website_details",
    "website_authority",
    "traffic_overview"
   ],
   "type": "string",
   "default": "top_websites",
   "description": "Choose ranked websites or a public domain summary. The domain modes share one public source but label the result for its use case."
  },
  "rankingMode": {
   "enum": [
    "ranking",
    "trending"
   ],
   "type": "string",
   "default": "ranking",
   "description": "For top websites: the main traffic ranking or the twenty trending sites on the first page."
  },
  "includeDetails": {
   "type": "boolean",
   "default": false,
   "description": "Fetch each ranked website's public detail page to add Domain Rating, traffic value, keywords, countries, and competitors. One extra page request per website."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 1,
  "items": [
   {
    "rank": null,
    "website": null,
    "category": null,
    "detailUrl": null,
    "rankChange": null,
    "searchType": null,
    "websiteUrl": null,
    "rankingMode": null
   }
  ],
  "product": "ahrefs"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ahrefs-web-data-scraper-via-scrapeforagents-69d4435e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.scrapeforagents.tech](https://www.zero.xyz/host/api.scrapeforagents.tech/llms.txt)
