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:
{
"sites": [...],
"totals": {...},
"data": [...]
} Error responses include an error message and code:
{
"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?
https://attractos.com/api/v1. For example, the sites endpoint is https://attractos.com/api/v1/sites.What format are responses in?
Content-Type: application/json in your requests.