Sign in

Authentication

Authenticate your API requests with an API key.

API Key Format

API keys start with nrf_ followed by 64 hexadecimal characters.

nrf_a1b2c3d4e5f6...

Generate keys from your dashboard.

Authentication Methods

Recommended

Authorization Header

Pass your key in the Authorization header using the Bearer scheme.

bash
curl "https://api.newsrank.ai/v1/stories" \
  -H "Authorization: Bearer nrf_your_api_key"
javascript
const response = await fetch("https://api.newsrank.ai/v1/stories", {
  headers: {
    "Authorization": "Bearer nrf_your_api_key"
  }
});
Deprecated

Query Parameter

Pass your key as the api_key query parameter. This method is deprecated because it risks leaking credentials in server logs, browser history, and referrer headers. Use the Authorization header instead.

bash
curl "https://api.newsrank.ai/v1/stories?api_key=nrf_your_api_key"
javascript
const response = await fetch(
  "https://api.newsrank.ai/v1/stories?api_key=nrf_your_api_key"
);

Scopes

API keys are assigned a scope that determines what operations they can perform.

ScopeAccessDescription
readRead-onlyAccess all GET endpoints. Suitable for most integrations.
writeRead + WriteEverything in read, plus ability to create and modify resources.
adminFull accessComplete API access including administrative operations.
ws:connectWebSocketConnect to the real-time WebSocket feed. Available on paid plans.