Anchors
The SerpstatBacklinksProcedure.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.
Use case: with the SerpstatBacklinksProcedure.getAnchors method, check what anchors your competitors use and utilize these anchors for your own links.
General request parameters and instructions for using Serpstat API
Request parameters | |||||
Parameter | Description | Type | Required | Default value | Value options |
id | A request id: the response contains the same id. Enter any number (number) or text (string) value | int/string | yes |
| Text or number value. For example: 1, test |
method | API method name | string | yes |
| SerpstatBacklinksProcedure.getAnchors |
params | The object with parameters {...}, it lists all the following parameters and arrays [...] |
| yes | ||
query | Domain of the analyzed site. Specify the domain without http / https and «/» | string | yes | The text value of the domain being analyzed. For example: serpstat.com | |
searchType | Search modes for analysis | string | yes | * domain - only domain (site.com) * domain_with_subdomains - domain with subdomains (subdomain.site.com) * URL - the specific URL (site.com/path/) * part_url - URL starts with (site.com/path/*) | |
page | A page number (number value) | int | no | 1 | any number value |
size | A number of results (number value) | int | no | 100 | number value in the range of 1-1000 |
sort | Sorting the results | string | no | lastupdate | * 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 |
order | Order | string | no | desc | * asc - in the ascending order * desc - in the descending order |
Filter conditions parameters | ||
Parameter | Description | |
complexFilter | Data filtering, entered as arrays [...] with the following parameters: 1) field - filter parameter; available filtering: * 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) 2) compareType - filter parameter: The first square brackets list the "OR" conditions. The second ones within the first are the "AND" conditions. |
Response parameters | |
Parameter | Description |
id | Response id corresponds the request id |
result | Contains the answer |
data | Array with data |
anchor | The anchor text |
refDomains | The number of referring domains with this anchor |
total | The number of backlinks with this anchor |
noFollow | The number of nofollow backlinks with this anchor |
summary_info | Object with data |
page | Page number |
total | Number of results for the request |
count | Number of results in this answer |
left_lines | Left credits of lines for your pricing plan |
sort | What data are sorted by |
order | Data sorted: * asc - in the ascending order * desc - in the descending order |
API credits are spent at 1 credit per line. Part of the API response for which you spend 1 credit:
{
"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"
]
},
{
"additional_filters": "no_subdomains"
}
]
]
}
}
{
"id": "1",
"result": {
"data": [
{
"anchor": "加入Serpstat会员计划››",
"refDomains": 1,
"total": 2,
"noFollow": 2
},
{
"anchor": "«Serpstat»",
"refDomains": 3,
"total": 3,
"noFollow": 1
}
],
"summary_info": {
"left_lines": 999816,
"page": 1,
"count": 2,
"total": 78,
"sort": "anchor",
"order": "DESC"
}
}
}