Data API
Authentication
How to authenticate requests to the Data API using Clerk API keys.
All Data API requests require authentication via an API key passed in the Authorization header.
Getting an API Key
- Sign up or log in at newbizbot.ai
- Go to the Data API Dashboard
- Click Create Key and give it a descriptive name
- Copy the secret immediately — it is only shown once
Using Your API Key
Pass the key as a Bearer token in the Authorization header:
curl "https://newbizbot.ai/api/data/ppp_loans?borrower_state=eq.CA&limit=5" \
-H "Authorization: Bearer YOUR_API_KEY"Quick Test
Verify your API key works with this minimal request:
curl -s "https://newbizbot.ai/api/data/ppp_loans?borrower_state=eq.TX&limit=1" \
-H "Authorization: Bearer YOUR_API_KEY" | head -c 200A successful response returns a JSON array with one loan record. If you see an error, check that your key is correct and hasn't been revoked.
Error Responses
401 Unauthorized
Returned when no API key is provided or the key is invalid:
{
"error": "unauthorized",
"message": "A valid API key is required. Pass it as: Authorization: Bearer YOUR_API_KEY",
"code": 401
}429 Rate Limited
Returned when you exceed 100 requests/minute:
{
"error": "rate_limit_exceeded",
"message": "Rate limit of 100 requests/minute exceeded. Retry after 2026-02-09T12:01:00Z.",
"code": 429
}Check the response headers for rate limit info:
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests per window |
X-RateLimit-Remaining | Requests remaining |
X-RateLimit-Reset | Unix timestamp when the window resets |
Security Notes
- API keys grant read-only access to public FOIA datasets
- Keys are scoped to the Data API — they cannot access other NewBizBot resources
- Revoke compromised keys immediately from the dashboard