API Authentication
The Audioscrape API uses Bearer token authentication. All API requests must include your API key in the Authorization header to access protected endpoints.
Getting Your API Key
-
1
Sign In
Log in to your Audioscrape account at audioscrape.com
-
2
Go to API Keys
Navigate to Profile → API Keys
-
3
Create a Key
Click "Create New Key" and give it a descriptive name
-
4
Copy Your Key
Copy the key immediately - it will only be shown once
Using Your API Key
Include your API key in the Authorization header as a Bearer token:
curl -X POST "https://www.audioscrape.com/api/v1/search" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "artificial intelligence"}'
Example: JavaScript/Node.js
const response = await fetch('https://www.audioscrape.com/api/v1/search', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
query: 'artificial intelligence'
})
});
const data = await response.json();
Example: Python
import requests
response = requests.post(
'https://www.audioscrape.com/api/v1/search',
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={
'query': 'artificial intelligence'
}
)
data = response.json()
Error Responses
401 Unauthorized
Missing or invalid API key
{"error": "Unauthorized", "message": "Invalid or missing API key"}
403 Forbidden
API key is valid but lacks required permissions
{"error": "Forbidden", "message": "Insufficient permissions"}
429 Too Many Requests
Rate limit exceeded
{"error": "Rate Limited", "message": "Too many requests", "retry_after": 60}
Security Best Practices
- • Never expose your API key in client-side code or public repositories
- • Use environment variables to store API keys
- • Rotate your API keys periodically
- • Delete unused API keys from your account
Rate Limits
API rate limits vary by subscription plan:
| Plan | Requests/Month | Rate Limit |
|---|---|---|
| Free | 100 | 10/minute |
| Pro | 10,000 | 100/minute |
| Enterprise | Unlimited | Custom |
See pricing for full details on each plan.
Need Help?
Having trouble with authentication? Contact us at [email protected].