# Fixed reference example. Playground inputs do not update this sample.
curl --request POST \
--url https://api.aisa.one/apis/v1/dataforseo/on_page/redirect_chains \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '[
{
"id": "03051327-4536-0216-1000-3b458a2cfcca",
"url": "https://test_rdr.dataforseo.com/a/"
}
]'curl --request POST \
--url https://api.aisa.one/apis/v1/dataforseo/on_page/redirect_chains \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"id": "03051327-4536-0216-1000-3b458a2cfcca",
"url": "https://test_rdr.dataforseo.com/a/"
}
]
'import requests
url = "https://api.aisa.one/apis/v1/dataforseo/on_page/redirect_chains"
payload = [
{
"id": "03051327-4536-0216-1000-3b458a2cfcca",
"url": "https://test_rdr.dataforseo.com/a/"
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
id: '03051327-4536-0216-1000-3b458a2cfcca',
url: 'https://test_rdr.dataforseo.com/a/'
}
])
};
fetch('https://api.aisa.one/apis/v1/dataforseo/on_page/redirect_chains', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/dataforseo/on_page/redirect_chains",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'id' => '03051327-4536-0216-1000-3b458a2cfcca',
'url' => 'https://test_rdr.dataforseo.com/a/'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/dataforseo/on_page/redirect_chains"
payload := strings.NewReader("[\n {\n \"id\": \"03051327-4536-0216-1000-3b458a2cfcca\",\n \"url\": \"https://test_rdr.dataforseo.com/a/\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/dataforseo/on_page/redirect_chains")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"id\": \"03051327-4536-0216-1000-3b458a2cfcca\",\n \"url\": \"https://test_rdr.dataforseo.com/a/\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/dataforseo/on_page/redirect_chains")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"id\": \"03051327-4536-0216-1000-3b458a2cfcca\",\n \"url\": \"https://test_rdr.dataforseo.com/a/\"\n }\n]"
response = http.request(request)
puts response.read_body{
"cost": 123,
"status_code": 123,
"status_message": "<string>",
"tasks_count": 123,
"tasks_error": 123,
"time": "<string>",
"version": "<string>",
"tasks": [
{
"cost": 123,
"data": {},
"id": "<string>",
"path": [
"<string>"
],
"result_count": 123,
"status_code": 123,
"status_message": "<string>",
"time": "<string>",
"result": [
{
"crawl_progress": "<string>",
"crawl_status": {
"max_crawl_pages": 123,
"pages_crawled": 123,
"pages_in_queue": 123
},
"items": [
{
"chain": [
{
"hreflang": "<string>",
"is_valid_hreflang": true,
"direction": "<string>",
"dofollow": true,
"domain_from": "<string>",
"domain_to": "<string>",
"is_broken": true,
"is_link_relation_conflict": true,
"link_from": "<string>",
"link_to": "<string>",
"page_from": "<string>",
"page_from_scheme": "<string>",
"page_to": "<string>",
"page_to_scheme": "<string>",
"page_to_status_code": 123,
"type": "<string>"
}
],
"is_redirect_loop": true
}
],
"items_count": 123,
"total_items_count": 123
}
]
}
]
}On Page Redirect Chains
# Fixed reference example. Playground inputs do not update this sample.
curl --request POST \
--url https://api.aisa.one/apis/v1/dataforseo/on_page/redirect_chains \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '[
{
"id": "03051327-4536-0216-1000-3b458a2cfcca",
"url": "https://test_rdr.dataforseo.com/a/"
}
]'curl --request POST \
--url https://api.aisa.one/apis/v1/dataforseo/on_page/redirect_chains \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"id": "03051327-4536-0216-1000-3b458a2cfcca",
"url": "https://test_rdr.dataforseo.com/a/"
}
]
'import requests
url = "https://api.aisa.one/apis/v1/dataforseo/on_page/redirect_chains"
payload = [
{
"id": "03051327-4536-0216-1000-3b458a2cfcca",
"url": "https://test_rdr.dataforseo.com/a/"
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
id: '03051327-4536-0216-1000-3b458a2cfcca',
url: 'https://test_rdr.dataforseo.com/a/'
}
])
};
fetch('https://api.aisa.one/apis/v1/dataforseo/on_page/redirect_chains', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/dataforseo/on_page/redirect_chains",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'id' => '03051327-4536-0216-1000-3b458a2cfcca',
'url' => 'https://test_rdr.dataforseo.com/a/'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/dataforseo/on_page/redirect_chains"
payload := strings.NewReader("[\n {\n \"id\": \"03051327-4536-0216-1000-3b458a2cfcca\",\n \"url\": \"https://test_rdr.dataforseo.com/a/\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/dataforseo/on_page/redirect_chains")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"id\": \"03051327-4536-0216-1000-3b458a2cfcca\",\n \"url\": \"https://test_rdr.dataforseo.com/a/\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/dataforseo/on_page/redirect_chains")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"id\": \"03051327-4536-0216-1000-3b458a2cfcca\",\n \"url\": \"https://test_rdr.dataforseo.com/a/\"\n }\n]"
response = http.request(request)
puts response.read_body{
"cost": 123,
"status_code": 123,
"status_message": "<string>",
"tasks_count": 123,
"tasks_error": 123,
"time": "<string>",
"version": "<string>",
"tasks": [
{
"cost": 123,
"data": {},
"id": "<string>",
"path": [
"<string>"
],
"result_count": 123,
"status_code": 123,
"status_message": "<string>",
"time": "<string>",
"result": [
{
"crawl_progress": "<string>",
"crawl_status": {
"max_crawl_pages": 123,
"pages_crawled": 123,
"pages_in_queue": 123
},
"items": [
{
"chain": [
{
"hreflang": "<string>",
"is_valid_hreflang": true,
"direction": "<string>",
"dofollow": true,
"domain_from": "<string>",
"domain_to": "<string>",
"is_broken": true,
"is_link_relation_conflict": true,
"link_from": "<string>",
"link_to": "<string>",
"page_from": "<string>",
"page_from_scheme": "<string>",
"page_to": "<string>",
"page_to_scheme": "<string>",
"page_to_status_code": 123,
"type": "<string>"
}
],
"is_redirect_loop": true
}
],
"items_count": 123,
"total_items_count": 123
}
]
}
]
}Request contract
- Method and path: POST /apis/v1/dataforseo/on_page/redirect_chains
- Availability: enabled
- Request URL template: https://api.aisa.one/apis/v1/dataforseo/on_page/redirect_chains
- Runtime facts: 6ab8fec17df1d5dcdff2e036dd1eb40587752b774ec040ab4eb0cc6946c3dd3c
{
"operationId": "any_dataforseo_apis_v1_dataforseo_on_page_redirec_35bad7",
"method": "POST",
"path": "/apis/v1/dataforseo/on_page/redirect_chains",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"example": [
{
"id": "03051327-4536-0216-1000-3b458a2cfcca",
"url": "https://test_rdr.dataforseo.com/a/"
}
],
"items": {
"oneOf": [
{
"example": [
{
"id": "03051327-4536-0216-1000-3b458a2cfcca",
"url": "https://test_rdr.dataforseo.com/a/"
}
],
"properties": {
"filters": {
"description": "<em>array of results filtering parameters</em><br>optional field<br><strong>you can use only one filtering parameter with this endpoint</strong><p>the following filtering parameter is supported:<br><code>is_redirect_loop</code><br>the following operators are supported:<br><code>regex</code>, <code>not_regex</code>, <code>=</code>, <code><></code><p>examples:<br><code>[\"is_redirect_loop\",\"=\",\"true\"]</code><p><code>[\"is_redirect_loop\",\"<>\",\"false\"]</code>",
"items": {
"type": [
"object",
"null"
]
},
"type": [
"array",
"null"
]
},
"id": {
"description": "<em>ID of the task</em><br><strong>required field</strong><br>you can get this ID in the response of the <a href=\"/v3/on_page/task_post/\">Task POST</a> endpoint<br>example:<br>\"07131248-1535-0216-1000-17384017ad04\"",
"type": "string"
},
"limit": {
"description": "<em>the maximum number of returned redirect chains</em><br>optional field<br>default value: <code>100</code><br>maximum value: <code>1000</code>",
"type": [
"integer",
"null"
]
},
"offset": {
"description": "<em>offset in the results array of returned redirect chains</em><br>optional field<br>default value: <code>0</code><br>maximum value: <code>2000000</code><br>if you specify the <code>10</code> value, the first ten redirect chains in the results array will be omitted and the data will be provided for the successive redirect chains",
"type": [
"integer",
"null"
]
},
"tag": {
"description": "<em>user-defined task identifier</em><br>optional field<br><em>the character limit is 255</em><br>you can use this parameter to identify the task and match it with the result<br>you will find the specified <code>tag</code> value in the <code>data</code> object of the response",
"type": [
"string",
"null"
]
},
"url": {
"description": "<em>page URL</em><br>optional field<br>absolute URL of the target page<br>if you use this field, the API response will return only redirect chains which contain the specified URL",
"type": [
"string",
"null"
]
}
},
"type": "object"
}
],
"type": [
"object",
"null"
]
},
"type": "array"
}
}
}
},
"x-aisa-status": "enabled",
"x-aisa-pricing": {
"cost_contract": "response_usd",
"customer_multiplier": 1.0,
"customer_pricing": "provider_cost_multiplier",
"default_request_estimate_usd": 0.012,
"estimate_source": "profile_seed",
"evidence_source": "response_body"
},
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
Usage-based billing; Default request estimate: $0.012 USD (not a fixed price). Account-specific pricing and final settlement may differ. Published reference values are not an account-specific quote or a settled charge. For endpoints supporting X-AISA-Cost-Mode: quote, obtain a free quote for your exact request before execution; reconcile the settled cost with response metadata and Usage Logs. USD amounts use 1,000,000 integer micro-USD per dollar.- Default request reference estimate (USD): 0.012
- Cost contract: response_usd
- Published reference multiplier: 1.0
- Settlement evidence source: response_body
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
array of results filtering parameters
optional field
you can use only one filtering parameter with this endpoint
the following filtering parameter is supported:is_redirect_loop
the following operators are supported:regex, not_regex, =, <>
examples:["is_redirect_loop","=","true"]
["is_redirect_loop","<>","false"]
the maximum number of returned redirect chains
optional field
default value: 100
maximum value: 1000
offset in the results array of returned redirect chains
optional field
default value: 0
maximum value: 2000000
if you specify the 10 value, the first ten redirect chains in the results array will be omitted and the data will be provided for the successive redirect chains
user-defined task identifier
optional field
the character limit is 255
you can use this parameter to identify the task and match it with the result
you will find the specified tag value in the data object of the response
page URL
optional field
absolute URL of the target page
if you use this field, the API response will return only redirect chains which contain the specified URL
[
{
"id": "03051327-4536-0216-1000-3b458a2cfcca",
"url": "https://test_rdr.dataforseo.com/a/"
}
]
Response
Successful operation
total tasks cost, USD
general status code you can find the full list of the response codes here
general informational message you can find the full list of general informational messages here
the number of tasks in the tasks array
the number of tasks in the tasks array returned with an error
total execution time, seconds
the current version of the API
array of tasks
Show child attributes
Show child attributes