Skip to main content
Every request to the NearIQ API must include a valid API key. You can pass your key using either the X-NearIQ-Key header (preferred) or a standard Authorization: Bearer header — both are accepted on all endpoints.
API access requires the Growth plan or above. If your account is on the free tier, upgrade in Settings → Billing before generating a key.

Base URL

All API endpoints share the following base URL:
https://neariq.io/api/v1

Getting your API key

1

Open Settings

Navigate to Settings → API Keys in your NearIQ dashboard.
2

Generate a key

Click New API Key, give it a descriptive name, and confirm. Your key is displayed once — copy it immediately.
3

Store it securely

Treat your API key like a password. Store it in an environment variable (e.g. NEARIQ_API_KEY) and never commit it to source control.
All API keys are prefixed with niq_live_ followed by a random string, for example: niq_live_a1b2c3d4e5f6...

Sending your key

X-NearIQ-Key header (preferred)

curl https://neariq.io/api/v1/me \
  -H "X-NearIQ-Key: niq_live_a1b2c3d4e5f6..."

Authorization Bearer header

curl https://neariq.io/api/v1/me \
  -H "Authorization: Bearer niq_live_a1b2c3d4e5f6..."
Both styles are functionally identical. Use whichever fits your existing HTTP client configuration.
curl https://neariq.io/api/v1/me \
  -H "X-NearIQ-Key: niq_live_a1b2c3d4e5f6..."

What happens when authentication fails

If your key is missing, malformed, or revoked, the API returns a 401 Unauthorized response:
{
  "error": "Invalid or missing API key. Pass your key via X-NearIQ-Key header."
}
Check that:
  • The key starts with niq_live_
  • The key has not been revoked in Settings → API Keys
  • The header name is spelled correctly (X-NearIQ-Key, not X-Neariq-Key)

Revoking a key

To revoke a key, go to Settings → API Keys and click Revoke next to the key you want to invalidate. Revoked keys immediately stop working; any in-flight requests using that key will fail with 401.