# Bot Detector API

> Bot Detector analyzes user agent strings to identify bots, crawlers, and automated software. It matches against a database of known bots and adds heuristics that catch automated clients not in the database, returning the bot's category, reputation and a composite risk score. Useful for security, analytics, and access control.

**Endpoint:** `GET https://api.apiverve.com/v1/botdetector`  
**Category:** Networking  
**Cost:** 10 credits per call  
**Canonical page:** https://apiverve.com/marketplace/botdetector

## Overview

A bot detection API for crawlers and scrapers. Bot Detector uses a comprehensive database of known bot and crawler user agent patterns to identify automated traffic, categorizing detected bots into types like search engines, social media crawlers, SEO tools, and monitoring services. It also applies list-free heuristics to flag automated clients the database misses — missing user agents and non-browser clients such as curl and scripts — and returns a composite risk score.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/botdetector?ua=Googlebot%2F2.1%20(%2Bhttp%3A%2F%2Fwww.google.com%2Fbot.html)&ip=66.249.66.1" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `ua` | string | Yes | The user agent string to analyze (URL encoded) |
| `ip` | string | No | Optional IP the request came from. When the user agent claims to be a Google, Bing, OpenAI or Apple crawler, it is checked against that operator's published IP ranges. ip |

## Response fields

- `userAgent` — string · The analyzed user agent string provided in the request
- `isBot` — boolean · Whether the user agent belongs to a known bot or crawler
- `bot` — object · Detailed bot information including name, category, and reputation · (premium)
  - `bot.name` — string · Name of the detected bot or crawler, as it appears in the user agent (e.g. SemrushBot, Wget) · (premium)
  - `bot.category` — string · Category of bot: search_engine, social_media, monitoring, seo_tool, feed_fetcher, crawler (a generic crawler not in a narrower category), scraper, other · (premium)
  - `bot.url` — string · Official URL or documentation link for the bot · (premium)
  - `bot.reputation` — string · Trust level: trusted (search engines, social), neutral (monitoring, SEO), malicious (scrapers, spam, or a crawler user agent that failed IP verification, i.e. verified=false), or unknown · (premium)
  - `bot.shouldBlock` — boolean · Recommendation whether to block this bot based on category and reputation; always true for a spoofed crawler (verified=false) · (premium)
- `isAutomated` — boolean · Heuristic signal that the traffic is automated — true for known bots, missing user agents, and clients that do not present as a standard browser (e.g. curl, scripts, headless tooling). Catches automated clients not in the bot database · (premium)
- `verified` — boolean · Whether a claimed Google, Bing, OpenAI or Apple crawler really comes from that operator's published IP ranges (false = spoofed). Null when no ip is given or the user agent claims no verifiable crawler · (premium)
- `riskScore` — number · Composite 0-100 risk score combining bot reputation, block recommendation and automation heuristics (higher is riskier) · (premium)
- `riskLevel` — string · Risk band derived from the score: low, medium or high · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "userAgent": "Googlebot/2.1 (+http://www.google.com/bot.html)",
    "isBot": true,
    "bot": {
      "name": "Googlebot",
      "category": "search_engine",
      "url": "http://www.google.com/bot.html",
      "reputation": "trusted",
      "shouldBlock": false
    },
    "isAutomated": true,
    "verified": true,
    "riskScore": 0,
    "riskLevel": "low"
  }
}
```

## Use cases

- **Analytics Filtering** — Exclude bot traffic from your analytics to get accurate visitor metrics and user behavior data
- **Access Control** — Implement different behavior for bots vs real users, such as rate limiting or content restrictions
- **Security Monitoring** — Identify potentially malicious crawlers and scrapers attempting to access your content
- **SEO Insights** — Track which search engine bots are crawling your site and how frequently

## SDKs

- **npm** — `npm install @apiverve/botdetector` (https://www.npmjs.com/package/@apiverve/botdetector)
- **PyPI** — `pip install apiverve-botdetector` (https://pypi.org/project/apiverve-botdetector/)
- **NuGet** — `dotnet add package APIVerve.API.BotDetector` (https://www.nuget.org/packages/APIVerve.API.BotDetector)
- **Source** — https://github.com/apiverve/botdetector-api

## More

- Full reference: https://docs.apiverve.com/ref/botdetector
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
