Getting information about broken internal links on the site
Returns examples of broken internal links on the site. The list of link examples is based on the data from the Yandex robot. The link is considered broken if there is an error in the URL of the page, the URL of the page changed or the page doesn't exist.
Request format
GET https://api.webmaster.yandex.net/v4/user/{user-id}/hosts/{host-id}/links/internal/broken/samples
? [offset=<int32>]
& [limit=<int32>]
& [indicator=<string>]
|
Type: |
|
Type: |
|
Offset in the list. The minimum value is 0. Default value: 0. |
|
Page size (1-100). Default value: 10. |
|
The broken link indicator — the reason the link doesn't work (ApiInternalLinksBrokenIndicator). You can specify multiple indicators. For example, If the indicator is omitted, the report will contain all link types. |
Internal link indicators (ApiInternalLinksBrokenIndicator)
Indicator |
Description |
|
The total number of known external links to the site. |
|
The page doesn't exist or is prohibited from indexing. |
|
Not supported by the main Search indexing robot. |
Response format
Examples
JSONXML
{ "count": 1, "links": [ { "source_url": "http://example.com/page1/", "destination_url": "https://example.com/page2/", "discovery_date": "2019-01-01", "source_last_access_date": "2019-01-01", }, ... ] }
<Data> <count>1</count> <link> <source_url>https://example.com/page1/</source_url> <destination_url>https://example.com/page2/</destination_url> <discovery_date>2019-01-01</discovery_date> <source_last_access_date>2019-01-01</source_last_access_date> </link> ... </Data>
Name |
Required |
Type |
Description |
|
Yes |
|
The number of example links available. |
|
Yes |
|
The URL of the page that contains the link to the site. |
|
Yes |
|
The target page URL (where the link points to). |
|
Yes |
|
The date when the link was detected. |
|
Yes |
|
The date when the robot last visited the target page. |
Response codes
To view the response structure in detail, click the reason.
Code |
Reason |
Description |
200 |
OK |
|
403 |
The ID of the user who issued the token differs from the one specified in the request. In the examples below, JSON
XML
|
|
404 |
Site management rights are not verified. JSON
XML
|
Related information
Type: int64
. User ID. Required when calling all Yandex.Webmaster API resources. To get it, use the GET /v4/user method.
Type: host id (string)
. The site ID. To get it, use the GET /v4/user/{user-id}/hosts method.
Offset in the list. The minimum value is 0. Default value: 0.
Page size (1-100). Default value: 10.
The broken link indicator — the reason the link doesn't work (ApiInternalLinksBrokenIndicator). You can specify multiple indicators. For example, indicator=SITE_ERROR&indicator=DISALLOWED_BY_USER
.
If the indicator is omitted, the report will contain all link types.
Internal link indicators (ApiInternalLinksBrokenIndicator)
Indicator |
Description |
|
The total number of known external links to the site. |
|
The page doesn't exist or is prohibited from indexing. |
|
Not supported by the main Search indexing robot. |
Description
Error code.
Description
ID of the user who allowed access.
Description
Error message.
Description
ID of the requested site.
Required
Yes
Type
int64
Description
The number of example links available.
Required
Yes
Type
string
Description
The URL of the page that contains the link to the site.
Required
Yes
Type
url
Description
The target page URL (where the link points to).
Required
Yes
Type
Date
Description
The date when the link was detected.
Required
Yes
Type
Date
Description
The date when the robot last visited the target page.