DataSiteRedirectFetch

⌘K

Use this endpoint to see the final redirect target of a page after following known redirects in the index. This data can be helpful for tasks like technical audits, checking that redirects were implemented correctly after domain migrations or page moves.

JSON-RPC Method:

data.site.redirect.fetch
Go to Example Code

Request

site_query

object

A SiteQuery provides a target URL along with a scope to define how the query is parsed.

1{
2  "site_query": {
3    "query": "seomoz.org/blog",
4    "scope": "url"
5  }
6}

Response

site_query

object

Represents a parsed site query.

destination

string | null

If the provided site query redirects, this will be the final destination after following it and any subsequent redirects. If it does not redirect, it will be null.

1{
2  "site_query": {
3    "query": "https://seomoz.org/blog",
4    "scope": "url",
5    "original_site_query": {
6      "query": "seomoz.org/blog",
7      "scope": "url"
8    },
9    "site_query_suggestion": null
10  },
11  "destination": "moz.com/blog"
12}

Example Code

Quota Usage

Uses one row per call.

api.limits.data.rows