Anyhunt
API Reference

API Reference

Complete API documentation for Anyhunt Web Scraper

API Reference

Anyhunt provides a comprehensive REST API for web scraping and content extraction. All endpoints use JSON for requests and responses.

Base URL

https://server.anyhunt.app

Authentication

All API requests require authentication via Bearer token:

Authorization: Bearer ah_your_api_key

Get your API key from the Console.

Available APIs

Core APIs

Advanced APIs

Quick Start

Here's a simple example to get you started:

curl -X POST https://server.anyhunt.app/api/v1/scrape \
  -H "Authorization: Bearer ah_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "formats": ["markdown"]
  }'

Response Format

All API responses follow standard HTTP semantics:

Success Response (raw JSON)

{
  // Response data
}

Error Response (RFC7807)

{
  "type": "https://anyhunt.app/errors/ERROR_CODE",
  "title": "Error Title",
  "status": 400,
  "detail": "Human-readable error message",
  "code": "ERROR_CODE",
  "requestId": "req_123"
}

Common Error Codes

CodeStatusDescription
UNAUTHORIZED401Missing or invalid API key
RATE_LIMITED429Too many requests
QUOTA_EXCEEDED429Monthly quota exhausted
INVALID_URL400URL format is invalid
URL_NOT_ALLOWED400URL blocked by SSRF protection
PAGE_TIMEOUT504Page took too long to load
BROWSER_ERROR500Browser error occurred

Rate Limits

Rate limits are applied per API key:

PlanRequests/minuteConcurrent
Free102
Basic305
Pro6010
Team12020

When rate limited, you'll receive a 429 response with rate limit headers:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1705320600
Retry-After: 30

Webhooks

For long-running operations (Crawl, Batch Scrape), you can configure webhooks to receive notifications:

{
  "event": "crawl.completed",
  "data": {
    "id": "crawl_abc123",
    "status": "COMPLETED",
    "totalPages": 150,
    "completedPages": 150
  },
  "timestamp": "2024-01-15T10:30:00.000Z"
}

See individual API documentation for webhook configuration details.