Developer API
Programmatic access to cookie analysis, security audits, and performance metrics for integration with your tools.
API Documentation
Authentication
All requests must include an API key in the headers. Get your API key from your Dashboard.
GET /api/v1/analyze HTTP/1.1
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Rate Limits
- 1000 requests / hour
- Excess requests trigger automatic throttling
- 429 Too Many Requests if limit exceeded
API Endpoints
Core Endpoints
GET /api/v1/analyze?domain=example.com
GET /api/v1/reports/:id
POST /api/v1/scan
Endpoints Descriptions
/analyze
Initiates a cookie analysis for a specific domain
/reports
Fetch detailed reports by scan ID
/scan
Performs real-time cookie security scanning
/metrics
Gets performance metrics data about cookie payloads
Response Format
{
"id": "12345",
"analysis": {
"total_cookies": 18,
"secure_count": 15,
"insecure_count": 3,
"average_size": "2.7KB"
}
}
Code Examples
JavaScript Fetch
const analyze = async () => {
const response = await fetch('https://tools.cookies.com/api/v1/analyze?domain=example.com', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);
};
Python Requests
import requests
response = requests.get(
'https://tools.cookies.com/api/v1/analyze?domain=example.com',
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
print(response.json())
CLI Example
curl -X GET "https://tools.cookies.com/api/v1/analyze?domain=example.com" \
-H "Authorization: Bearer YOUR_API_KEY"
Developer Best Practices
Secure Your Key
Never expose API keys in client-side code. Use secure key management systems.
Use Webhooks
Subscribe to analysis completion webhooks for asynchronous processing.
Error Handling
Implement retry logic for rate-limited and temporary error responses.
Need Help Integrating?
Our developers team is available to help with API integration, custom hooks, or enterprise use cases.