Important Note: This article refers to the API v1.4, which is depreciated. For the current release (v2.0), please see the related documentation here.
API version 1.4 will continue to be operational, but will not receive any future updates. We recommend starting all new projects with API v2.0, and eventually migrating any existing projects from v1.4 to v2.0.
To protect server resources and ensure the fast performance of the Dragon Metrics API, calls are limited both by rate and a credit system.
There is no extra charge for using the API, and your account will be given more than enough credits than you need, enough to pull each data point 3 times. This is simply to encourage good caching habits when you create your client so that you're not pulling the same data from our API many times.
If you run out of credits, we can replenish them again at no charge. However, we may require a brief conversation with our support team to make sure you're employing proper caching procedures in your client.
How Credits Are Deducted
All calls to the Dragon Metrics API require credits, which are expended at the rate of 1 credit per result returned.
A "result" is defined as one instance of the main item being requested and corresponds to the number in the "start" and "limit" parameters. Items inside the main object are not counted separately, regardless of their number. This means that in the Keyword Ranking endpoint, one keyword and search engine combination always counts as 1 result, whether it has 0 ranking URLs or 10,000.
For example, a call to the Campaigns endpoint that returns 10 campaigns will cost 10 credits, a call to the Keyword Rankings endpoint that returns 50 keywords will cost 50 credits, and a call to the Keywod Groups endpoint that specifies a single keyword_group_id will cost 1 credit.
Each account is given a definite number of credits each month. On the 1st of each month, they are replenished back to the original number, regardless of the amount used during the month.
If there are not enough remaining credits to complete a call, you will receive an HTTP 429 (Too Many Requests) error, with a Dragon Metrics error object 2 (Out of Credits). On the first of the next month, when credits are replenished, you may continue making calls to the API.
If you would like to change the number of credits in your account, please contact firstname.lastname@example.org.
Get Your Current Remaining Credits
The /credits endpoint is available to see how many credits are remaining in your account this month. No parameters are required, and only a single value is returned.