It's easy to integrate your applications with the Dragon Metrics API. This page will provide everything you need to get started making your first request.

In addition to the documentation available here on the Help Center, we highly recommend checking out the Dragon Metrics API Documentation and Testing Sandbox, where you'll find a detailed description of each API endpoint and be able to make test calls right from the page without any programming required.

Get Access to the API

All subscription plans Basic and above come with API access. There's no additional fee for using the API, but if you're currently on a Starter subscription, you'll need to upgrade your plan to gain access.

To obtain API credentials, please message Dragon Metrics Support, who can set this up for you quickly. Please note that this username and password will be different than the username and password you use to log into the Dragon Metrics interface.

Shortly after we receive your request, your credentials will be available on My Settings.

Since the API gives complete access to the account, the credentials are only made available to the account owner.

Authenticate Your Requests

Now that you have your API credentials, you'll need to authenticate your first call. The Dragon Metrics API uses HTTP Basic Authentication to authenticate each request. As the name implies, this protocol is quite simple.

All requests must include the following HTTP request header:

Authorization: Basic {CREDENTIALS}

Where {CREDENTIALS} is a Base64 encoding of the string {username}:{password}.

For example:

Username: johdoe
Password: Lh78B30#grCgo%
Before Base64: johndoe:Lh78B30#grCgo%
After Base64: am9obmRvZTpMaDc4QjMwI2dyQ2dvJQ==
Full HTTP Request Header: Authorization: Basic am9obmRvZTpMaDc4QjMwI2dyQ2dvJQ==

Now you can make calls to the API, including this header in every request. If there is an issue with your authorization you'll receive a 401 (Unauthorized) error message.

IMPORTANT REMINDER: Although your username and password are encoded using Basic Authentication, they are not encrypted. Therefore, it's important to always send requests over HTTPS. All requests made over HTTP will be sending your username and password in plain text, and will result in a 403 (Forbidden) error response.

Make Your First Call

With our authentication all ready to go, let's make our first call.

The base URL of the Dragon Metrics API is https://api.dragonmetrics.com/v1.4/ - All endpoints begin with this base.

The "Campaigns" endpoint is perhaps one of the simplest calls, so let's begin here. It's located at https://api.dragonmetrics.com/v1.4/campaigns and requires no parameters. So simply make a call to this URL with the authorization header, and you'll receive a list of all campaigns in your account.

Curl example:

curl -X GET --header "Accept: application/json" --header "Authorization: Basic {CREDENTIALS}" "https://api.dragonmetrics.com/v1.4/campaigns"

Sample Response:

{
"results": [
{
"id": 3605,
"name": " United States",
"site": "example.com",
"status": "active",
"crawl_site": "true",
"crawl_limit": 300000,
"crawl_speed": "fast",
"alternate_seed_url": "example.com",
"keyword_credit_usage": 681,
"keyword_limit": 1000,
"domain_authority": 90,
"keyword_level_search_engine_tracking": "true"
}
],
"paging": {
"total": 1,
"limit": 50,
"start": 0,
"prev": null,
"self": "https://api.dragonmetrics.com/v1.4/campaigns?limit=50&start=0",
"next": null
}
}


Next Steps

You've successfully made your first call! From here, we recommend learning about common elements found in all API endpoints.

Did this answer your question?