NewBizBot
|Docs
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

  1. Sign up or log in at newbizbot.ai
  2. Go to the Data API Dashboard
  3. Click Create Key and give it a descriptive name
  4. 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 200

A 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:

HeaderDescription
X-RateLimit-LimitMaximum requests per window
X-RateLimit-RemainingRequests remaining
X-RateLimit-ResetUnix 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

On this page

Authentication | NewBizBot Documentation | NewBizBot Documentation