Gravity Index
Publisher performance
Read the numbers of your Index dashboard with your publisher API key.
GET
Publisher performance
This endpoint gives you the numbers of the Index page of your Gravity dashboard as JSON. You get revenue, Index calls, recommendations, clicks, click-through rate, conversions, conversion rate, and the daily series of the chart. You can ask for any window in the last 90 days. The API and the dashboard use one shared query, so they show the same totals for the same UTC date range.
If the request also has an
With an API key, the endpoint accepts only
To get the last 30 days to today, leave out both dates. One request each day is sufficient for most uses. The limit is 60 requests in one minute for each publisher.
Days are in UTC. The dashboard also uses UTC days. A range that matches the dashboard’s date picker returns the same totals as its cards.
Authentication
Send your publisher API key in theX-API-Key header. This is the key that you use for POST /search. The endpoint also accepts the header X-Platform-Api-Key.
string
required
Your publisher API key. The endpoint finds the publisher from the key. There is no publisher parameter.
Authorization header, the endpoint uses that header and returns the dashboard payload, not the payload on this page. Do not send both.
Request
string
default:"publisher"
Must be
publisher (the default). Any other value returns 422.string
The first UTC day,
YYYY-MM-DD. The default is 29 days before end_date (a 30-day window). Must be on or after available_from (today minus 90 days).string
The last UTC day,
YYYY-MM-DD, inclusive. The default is today (UTC). Must not be in the future, before start_date, or before available_from.side, start_date, and end_date. Any other parameter (for example limit or status) returns 422. Those parameters are for the dashboard session, which gets a different payload from this route.
Response
string
Your publisher ID.
string
Always
UTC.string
The first day in the window (
YYYY-MM-DD).string
The last day in the window (
YYYY-MM-DD).string
The earliest day that you can ask for (today minus 90 days).
object
The totals for the window. These are the dashboard’s cards.
array
One item for each UTC day from
start_date to end_date, oldest first. Days with no activity have zeros.index_calls is usually higher than recommendations. Searches with no match, and consumer product searches, also count as calls. For a publisher on CPA-only programs, this difference is normal. It does not mean that Gravity lost calls.