API

Competitors

You are reading the Project API docs

Base URL: api4.seranking.com

Data API and Project API keys are not interchangeable — use the correct one to avoid authentication errors.

Data apikey example:
80cfee7d-xxxx-xxxx-xxxx-fc8500816bb3
(UUID format)
Project apikey example:
253a73adxxxxxxxxxxxxxx340aa0a939
(40-char hex)

API keys are available in your account. For any questions or 401 errors, email [email protected] for support.

Competitors API provides endpoints to manage competitors and retrieve competitor ranking data within a project.


Add competitor

POST https://api4.seranking.com/competitors

Adds a competitor’s website to a project for position tracking.

Request parameters

ParameterTypeRequiredDescription
site_idIntegerYesUnique project (site) ID.
urlStringYesCompetitor website URL.
nameStringNoCompetitor website name. If not specified, the URL is used.
subdomain_matchIntegerNoInclude subdomains (1 – yes, 0 – no).

Request example

Copy
POST https://api4.seranking.com/competitors
{
site_id : 1,
name : "name",
url : "http://site.test.com/"
}

Response parameters

If successful, the server returns the 201 HTTP status code. Returns HTTP 400 if the URL is invalid.

ParameterTypeDescription
idIntegerCompetitor ID.

Response example

Copy
{ "id": 123456 }

List competitors

GET https://api4.seranking.com/competitors/site/{site_id}

Returns a list of competitors added to the specified project.

Request parameters

ParameterTypeRequiredDescription
site_idIntegerYesUnique project (site) ID (path parameter).

Request example

Copy
GET https://api4.seranking.com/competitors/site/1

Response parameters

If successful, the server returns the 200 HTTP status code and an array of competitors.

ParameterTypeDescription
idIntegerCompetitor ID.
nameStringCompetitor name.
urlStringCompetitor URL.
domain_trustIntegerCompetitor Domain Trust.

Response example

Copy
[
{
  "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
  }
]

Get competitor keyword positions

GET https://api4.seranking.com/competitors/{competitor_id}/positions

Returns ranking statistics for competitor keywords added to the project.

Request parameters

ParameterTypeRequiredDescription
competitor_idIntegerYesCompetitor ID (path parameter).
date_fromStringNoStart date (in YYYY-MM-DD). Defaults to one week before today.
date_toStringNoEnd date (in YYYY-MM-DD). Defaults to today.
site_engine_idIntegerNoSearch engine configuration ID. If not specified, all search engines are included.
with_serp_featuresIntegerNoInclude SERP features (1 – yes, 0 – no).

Request example

Copy
GET https://api4.seranking.com/competitors/123/positions?date_from=2018-07-25&date_to=2018-07-25&site_engine_id=1

Response parameters

If successful, the server returns the 200 HTTP status code and ranking data grouped by search engine. Returns HTTP 400 if the site_engine_id is invalid and HTTP 404 if the competitor is not found (for more information, see Error handling).

ParameterTypeDescription
site_engine_idIntegerSearch engine configuration ID.
keywordsArrayList of keywords.
idStringKeyword ID.
positionsArrayArray of positions containing statistics on competitor keyword rankings.
dateStringCheck date (in YYYY-MM-DD).
posIntegerCurrent position.
changeIntegerPosition change compared to previous check.
nameStringKeyword name (can be null).
volumeIntegerSearch volume (can be null).

Response example

Copy
[
{
"site_engine_id": 123,
    "keywords": [
    {
      "id": "123",
        "positions": [
        {
          "date": "2018-07-25",
            "pos": 7,
            "change": 1
          }
        ],
        "name": null,
        "volume": null
    },   
...
]
}
]

Delete competitor

DELETE https://api4.seranking.com/competitors/{competitor_id}

Removes a competitor from the specified project.

Request parameters

ParameterTypeRequiredDescription
competitor_idIntegerYesCompetitor ID (path parameter).

Request example

Copy
DELETE https://api4.seranking.com/competitors/123

Response parameters

If successful, the server returns the 204 HTTP status code. Returns HTTP 404 if the competitor is not found (for more information, see Error handling).

Response example

No response body.


Get TOP 10 results

GET https://api4.seranking.com/competitors/top10/{site_id}

Returns the TOP 10 ranking results for a tracked keyword.

Request parameters

ParameterTypeRequiredDescription
site_idIntegerYesProject (site) ID (path parameter).
dateStringYesDate of getting a list of sites from the TOP 10 (in YYYY-MM-DD).
site_engine_idIntegerYesSearch engine configuration ID (refer to https://api4.seranking.com/sites/{site_id}/keywords). 
keyword_idIntegerYesUnique keyword ID (refer to https://api4.seranking.com/sites/{site_id}/keywords).

Request example

Copy
GET https://api4.seranking.com/competitors/top10/1?date=2018-01-01&site_engine_id=1&keyword_id=1

Response parameters

If successful, the server returns the 200 HTTP status code and an array of results.

ParameterTypeDescription
urlStringPage URL.
positionIntegerPosition in SERP.
keyword_idIntegerKeyword ID.
backlinksStringTotal backlinks.
domainsStringReferring domains count.

Response example

Copy
[
{
"position": 1,
"url": "https://anandaioga.com/ca/inici",
"keyword_id": 4843813,
"backlinks": "216",
"domains": "57"
},
  ...
]

Get TOP 100 results

GET https://api4.seranking.com/competitors/top100/{site_id}

Returns a list of up to the TOP 100 results for keywords tracked in a project.

Request parameters

ParameterTypeRequiredDescription
site_idIntegerYesProject (site) ID (path parameter).
dateStringYesDate of getting a list of the TOP 100 results (in YYYY-MM-DD).
site_engine_idIntegerYesSearch engine configuration ID (refer to https://api4.seranking.com/sites/{site_id}/keywords).
keyword_idIntegerYesUnique keyword ID (refer to https://api4.seranking.com/sites/{site_id}/keywords).
topIntegerNoMaximum position (0–100).

Request example

Copy
GET https://api4.seranking.com/competitors/top100/1?date=2018-01-01&site_engine_id=1&keyword_id=1&top=50

Response parameters

If successful, the server returns the 200 HTTP status code and ranking results.

ParameterTypeDescription
urlStringPage URL.
positionIntegerPosition in SERP.
dateStringCheck date (in YYYY-MM-DD).
domain_trustIntegerDomain Trust value.

Response example

Copy
[
{
"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
},
...
]

Get all competitors

GET https://api4.seranking.com/competitors/all/{site_id}

Returns domains ranked in the TOP 10 for tracked keywords. History is stored for 14 days.

Request parameters

ParameterTypeRequiredDescription
site_idIntegerYesProject (site) ID (path parameter).
dateStringYesDate of getting domains ranked in the TOP 10 (in YYYY-MM-DD).
site_engine_idIntegerYesSearch engine configuration ID.
group_idIntegerNoKeyword group ID.
tagsArrayNoKeyword tag IDs.

Request example

Copy
GET https://api4.seranking.com/competitors/all/1?date=2018-01-01&site_engine_id=1&group_id=1&tags[]=21

Response parameters

If successful, the server returns the 200 HTTP status code and an array of domains.

ParameterTypeDescription
domain_idIntegerDomain ID.
domainStringDomain name.
visibilityIntegerVisibility value.
backlinksStringTotal backlinks.
domainsStringReferring domains count.

Response example

Copy
[
{
"domain": "www.tests.com",
"domain_id": 10,
"visibility": 0,
"backlinks": "328",
"domains": "32"
},
...
]

Learn how SE Ranking’s API can boost your SEO!

Hi! Meet our product expert, Alex.

He’ll walk you through the API and show you how to get the most out of it.

  • Enjoy a tailored demo on integrating rich, structured SEO data into your stack.
  • Pin down every tech detail live—auth, endpoints, rate limits, data formats.
  • Compare usage tiers and pricing so you can unlock maximum data value.

Request a free demo to see our tools and integrations in action

By clicking this button, you agree to SE Ranking’s Terms of Services and Privacy Policy.