API Description

Competitors

Adding a competitor to a project

The method allows to add a competitor’s site to a project to track positions.

Parameters

NameRequiredDescription
site_idYesUnique project ID
urlYesCompetitor’s website URL 
nameNoCompetitor’s website name (if not specified, the URL will be used)
subdomain_matchNoTake subdomains into account (1 – yes , 0 – no)

Request format

POST /competitors{site_id : 1,name : “name”,url : “http://site.test.com/”}

Result

If successful, the server returns the 201 HTTP code and the ID of the added competitor.

NameRequiredDescription
idYesUnique identifier of a competitor

Response example

{
    “id”: 123456
}

Errors

HTTP code Error message
400Invalid site url

Getting a list of the project competitors

The method allows to get a list of all competitors added to the project.

Request format

GET /competitors/site/{site_id}

Result

If successful, the server returns an array with a list of competitors added to the project together with the statistics on the competitors’ sites.

NameRequiredDescription
idYesCompetitor ID 
nameYesCompetitor name
urlYesCompetitor URL 
domain_trustYesCompetitor Domain Trust

Response example

[
    {
        “id”: 1,
        “name”: “competitor1.com”,
        “url”: “competitor1.com”,        “domain_trust” : 2,
    },
    {
        “id”: 2,
        “name”: “competitor2.com”,
        “url”: “http://competitor2.com/”,        “domain_trust” : 4,
    },
    {
        “id”: 3,
        “name”: “competitor3.com”,
        “url”: “http://competitor3.com”,        “domain_trust” : 6,
    }
]

Competitor’s keyword positions

The method allows to get statistics on the positions of competitor keywords that were added to the project.

Request format

GET /competitors/{competitor_id}/positions?date_from=2018-07-25&date_to=2018-07-25&site_engine_id=1

Request query parameters 

NameRequiredTypeDescription
date_fromNoyyyy-mm-ddTime period start date (today minus one week by default)
date_toNoyyyy-mm-ddTime period end date (today by default)
site_engine_idNoSearch engine ID.If not specified, data for all search engines will be returned.
with_serp_featuresNoGoogle SERP features found in keyword search results

Result

If successful, the server returns the statistics on the positions of competitor keywords that were added to the project.

NameRequiredDescription
idYesID of the query added to the project
positionsYesArray of positions containing statistics on competitor keyword rankings
dateYesDate of the keyword rankings check
changeYesChange in position compared to previous date (could be negative)
posYesCurrent position

Response example

[
    {
        “site_engine_id”: 123,
        “keywords”: [
            {
                “id”: “123”,
                “positions”: [
                    {
                        “date”: “2018-07-25”,
                        “pos”: 7,
                        “change”: 1
                    }
                ],
                “name”: null,
                “volume”: null
            },   …]

Errors

HTTP codeError message
400Invalid site_engine_id
404Incorrect competitor id

Deleting a competitor from a project


The method allows to remove a competitor’s site from a user project.

Request format

DELETE /competitors/{competitor_id}

Result

If successful, the server returns the 204 HTTP code.

Errors

HTTP codeError message
404Incorrect competitor id

Getting TOP 10 for the keyword

The method allows to get a list of the TOP 10 results for the keywords that are tracked in a project.

Request format

GET /competitors/top10/{site_id}/?date=2018-01-01&site_engine_id=1&keyword_id=1

Request query parameters 

NameRequiredTypeDescription
dateYesyyyy-mm-ddDate of getting a list of sites from the TOP 10
site_engine_idYesSearch engine ID
keyword_idNoThe ID of the query added to the project (use GET /sites/{site_id}/keywords to get it). If not specified, the TOP 10 will be returned for all project keywords.

Result

If successful, the server returns an array of sites from the TOP 10.

NameDescription
urlPage URL
positionPosition in the SERP
keyword_idUnique keyword ID
alexaAlexa
daMoz Domain Authority
backlinksTotal backlinks
domainsNumber of referring unique domains

Response example

[
    {
        “url”: “https://www.tests.com/login”,
        “position”: 1,
       “keyword_id”: 1,”alexa”: “46890”,”da”: null,”backlinks”: “328”,”domains”: “32” },
     …]

Getting top 100 for the keyword

The method allows to get a list of the top 100 results for the keywords that are tracked in a project.

GET /competitors/top100/{site_id}/?date=2018-01-01&site_engine_id=1&keyword_id=1&top={10}

Request query parameters 

NameRequiredTypeDescription
dateYesyyyy-mm-ddDate
site_engine_idYesSearch engine ID
keyword_idYesThe ID of the keyword added to the project (use GET /sites/{site_id}/keywords to get it). 
topNo0 .. 100Maximum position

Result

If successful, the server returns an array of sites from the top 100.

NameDescription
urlPage URL 
positionPosition in the SERP
dateDate of the positions check
domain_trustCompetitor Domain Trust

Response example

[
    {
        “url”: “https://www.tests.com/login”,
        “position”: 1,
       “date”: “2018-01-01”       “domain_trust”: 2    },{
        “url”: “https://www.test2.com,
        “position”: 2,
       “domain_trust”: 4    },

      …]

All competitors

Here you can find data on the sites that were ranked in the TOP 10 for each of the tracked queries. The history is stored for 14 days.

Request format

GET /competitors/all/{site_id}/?date=2018-01-01&site_engine_id=1&group_id=1&tags[]=21

Request query parameters 

NameRequiredTypeDescription
dateYesyyyy-mm-ddDate when the list of sites from the TOP 10 was received.
site_engine_idNoSearch engine ID. If not specified, data for all search engines will be returned.
group_idNoKeyword group ID. If not specified, data for all keyword groups will be returned.
tagsNoArray of tags

Result

If successful, the server returns an array of sites from the TOP 10.

NameDescription
domain_idDomain ID
domainCompetitor’s domain
visibilityCompetitor’s visibility
alexaAlexa
daMoz Domain Authority
backlinksTotal backlinks
domainsNumber of referring unique domains

Response example

[
    {
        “domain”: “www.tests.com”,
        “domain_id”: 10,
       “visibility”: 0,”alexa”: “46890”,”da”: null,”backlinks”: “328”,”domains”: “32” },
     …]