Anchors (getAnchors)
The getAnchors method gives you a list of keywords used as anchors for backlinks of a site you analyze. The data set is similar to the Anchors report. Outdated metrics are not removed from the method to maintain backward compatibility.
General request parameters and instructions for using Serpstat API
Request parameters |
|||
Parameter | Description | Default | |
id | required | A request id. Any number or string value is allowed. | |
method | required | API method name: SerpstatBacklinksProcedure.getAnchors | |
params | required | The array with parameters {...}, it lists all the following parameters and arrays. | |
query | required | A domain of the analyzed site. Specify the domain without http/ https и "/". | |
searchType | required | Search type: * domain_with_subdomains - domain with subdomains * domain - only domain * URL - only URL |
|
page | optional | A page number. Numbers are allowed. | 1 |
size | optional | A number of results. Numbers are allowed. | 100 |
sort | optional | Sort: * total - the total number of anchors * refDomains - number of referring domains * nofollow - anchor attributes * anchor - the anchor of the incoming link * lastupdate - date of the first detection |
lastupdate |
order | optional | Order: * asc - in the ascending order * desc - in the descending order |
desc |
complexFilter | optional | Data filtering, entered as arrays. Available columns: * total - the total number of anchors * refDomains - number of referring domains * nofollow - anchor attributes * anchor - the anchor of the incoming link * lastupdate - link detection date. Value format: DD.MM.YYYY (01.01.2001) Compare type: The first square brackets list the "OR" conditions. The second ones within the first are the "AND" conditions. |
|
linkPerDomain | optional | Data acquisition mode: * 0 - one link from the page * 1 - one link from the domain |
1 |
Response parameters | |
Parameter | Description |
id | Request id |
result | Contains the answer |
data | Array with data |
anchor | The anchor text |
refDomains | The number of referring domains with the anchor |
total | The number of the referring domains with the anchor |
noFollow | Link attributes. If several - are listed, separated by commas. Options: follow, nofollow, UGC, sponsored |
str | Serpstat TrustRank (outdated) |
spr | Serpstat PageRank (outdated) |
organic | Organic or paid links (outdated) |
ip | Referring IP addresses(outdated) |
redirect | Redirect backlinks (outdated) |
noindex | Noindex backlinks (outdated) |
summary_info | Array with data |
page | Page number |
total | Number of results for request |
count | Number of results in this answer |
left_lines | Left limit of lines for your pricing plan |
sort | What data is sorted by |
order | Data sorted in ascending / descending order |
API limits are spent at 1 limit per line. Part of the API response for which you spend 1 limit:
{
"anchor": "«Serpstat»",
"refDomains": 3,
"total": 3,
"noFollow": 3
}
{
"id": 1,
"method": "SerpstatBacklinksProcedure.getAnchors",
"params": {
"query": "serpstat.com",
"searchType": "domain_with_subdomains",
"anchor": "serpstat",
"count": "1",
"sort": "anchor",
"order": "desc",
"page": 1,
"size": 2,
"complexFilter": [
[
{
"field": "anchor",
"compareType": "contains",
"value": [
"serpstat"
]
},
{
"field": "total",
"compareType": "gt",
"value": [
"1"
]
},
{
"field": "noFollow",
"compareType": "gte",
"value": [
"1"
]
}
]
]
}
}
{
"id": "1",
"result": {
"data": [
{
"anchor": "«Serpstat»",
"refDomains": 3,
"total": 3,
"noFollow": 3
},
{
"anchor": "www.serpstat.com",
"refDomains": 12,
"total": 79,
"noFollow": 73
}
],
"summary_info": {
"left_lines": 999977,
"page": 1,
"count": 2,
"total": 112,
"sort": "anchor",
"order": "DESC"
}
}
}