API Reference

The AttractOS REST API lets you access your AI traffic data programmatically. Query bot visits, LLM referrals, conversions, and time-series metrics. All endpoints require Bearer token authentication and return JSON responses.

Base URL

https://attractos.com/api/v1

All endpoints documented here are relative to this base URL.

Authentication

All API requests require an API key passed in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Generate API keys in your dashboard settings. See Authentication for details.

Endpoints

Common Parameters

Most endpoints accept these query parameters:

Parameter Type Description
start string Start date (YYYY-MM-DD). Default: 7 days ago
end string End date (YYYY-MM-DD). Default: today
limit integer Max results to return. Varies by endpoint

Response Format

All successful responses return JSON with relevant data:

Success Response (200)
{
  "sites": [...],
  "totals": {...},
  "data": [...]
}

Error responses include an error message and code:

Error Response (4xx/5xx)
{
  "error": "Human-readable message",
  "code": "ERROR_CODE"
}

See Error Codes for the complete list.

Rate Limits

API requests are rate limited per minute:

  • Free: 60 requests/minute
  • Pro: 600 requests/minute

Rate limit headers are included in every response. See Rate Limits for details.

Versioning

The API is versioned in the URL path (/api/v1/). We'll increment the version for breaking changes. The current version is v1.

Non-breaking changes (new fields, new endpoints) may be added without version changes. Always handle unknown fields gracefully.

Frequently Asked Questions

What is the API base URL?
All API endpoints are relative to https://attractos.com/api/v1. For example, the sites endpoint is https://attractos.com/api/v1/sites.
What format are responses in?
All responses are JSON. Set Content-Type: application/json in your requests.
Is there an OpenAPI specification?
Yes. Download the OpenAPI 3.1 spec at /openapi.json. Use it with tools like Postman or to generate client libraries.
Are there SDKs available?
Not yet, but the API is simple enough to use with standard HTTP libraries. We recommend using the OpenAPI spec to generate typed clients for your language.
Bot Traffic by AttractOS