| Command status: | Active |
| Supported by OpenApps API: | Yes |
| Supported by Internal/Reseller API: | Yes |
| Possibly queued processing: | No |
This function returns Anchor text for a given domain, subdomain or URL, as well as allowing you to filter the results by a keyword
| Resource | Description |
|---|---|
AnalysisResUnits |
1000 |
RetrievalResUnits |
Actual number of rows of data returned |
This function accepts the following parameters:
| Parameter | Description |
|---|---|
cmd |
Required: must be set to: GetAnchorText |
datasource |
Optional - defaults to historic |
item |
URL/Subdomain/Domain to query |
TextMode |
0 (default) - returns anchor text (forced to lower case) as it was found with all punctunation marks etc |
Mode |
Determines the kind of data that will be returned back: |
FilterAnchorText |
Applied to filter anchor text FilterAnchorTextMode was set to appropriate mode. |
FilterAnchorTextMode |
0 (default) - no filter on anchor text |
FilterRefDomain |
Used only in cases when backlinks need to be returned for a particular ref domain. |
Count |
Number of results (anchor text, ref domains or backlinks) to be returned back. Default: 10, Maximum: 1000 |
Below you can see example of query for aggregated anchor text matching particular keyword: majestic:
http://enterprise.majesticseo.com/api_command?app_api_key=API_KEY&cmd=GetAnchorText&item=http://www.majesticseo.com&FilterAnchorText=majestic
This produces the following XML:
This produces the following JSON:
Query results will be returned in datatable named AnchorText with the following headers:
Below you can see example of a query that will return referring domains links from which used majestic as exact anchor text:
http://enterprise.majesticseo.com/api_command?app_api_key=API_KEY&cmd=GetAnchorText&item=http://www.majesticseo.com&FilterAnchorText=majestic&Mode=1
This produces the following XML:
This produces the following JSON:
Query results will be returned in datatable named RefDomains with the following headers:
Below you can see example of a query that will return actual backlinks using majestic as exact anchor text:
http://enterprise.majesticseo.com/api_command?app_api_key=API_KEY&cmd=GetAnchorText&item=http://www.majesticseo.com&FilterAnchorText=majestic&Mode=2
Please note that backlink queries will only work if previous queries for the same index item returned variable CanReturnURLs="1", otherwise query won't return any results (typically happens for large domains).
This produces the following XML:
This produces the following JSON:
Query results will be returned in datatable named BackLinks with the headers that are the same as in GetBackLinkData command.
For more information about access to the Majestic API suite, visit our Plans & Pricing page.