Skip to content
PubIndexAPI

Authentication / API Keys

All requests to API endpoints must contain a valid API key.

Getting an API Key

To get an API key you need to:

Using your API key

There are two ways to use your API key:

In the URL parameter

Example request:

https://api.pubindex.dev/api/ping?feed=https://example.com/feed/&api-key=abcdefghijklmno

In a HTTP Header

Using this method will encrypt your API key for added security.

Example request:

curl -H "api-key: abcdefghijklmno" https://api.pubindex.dev/api/ping?feed=https://example.com/feed/

Response

A successful response will return JSON and a 200 HTTP success code.

A typical successful response might look like this:

{
    "size":12345,
    "sizeChanged":true,
    "webSubPingSuccess":true,
    "googlePingSuccess":true
}

A response that does not include a valid API key will return a 401 HTTP error code and will look like this:

{ 
    "statusCode": 401, 
    "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." 
}