curl --request POST \
--url https://api.aisa.one/apis/v1/dataforseo/serp/ai_summary \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"task_id": "<string>",
"prompt": "<string>",
"support_extra": true,
"fetch_content": true,
"include_links": true
}
]
'import requests
url = "https://api.aisa.one/apis/v1/dataforseo/serp/ai_summary"
payload = [
{
"task_id": "<string>",
"prompt": "<string>",
"support_extra": True,
"fetch_content": True,
"include_links": True
}
]
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([
{
task_id: '<string>',
prompt: '<string>',
support_extra: true,
fetch_content: true,
include_links: true
}
])
};
fetch('https://api.aisa.one/apis/v1/dataforseo/serp/ai_summary', 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/serp/ai_summary",
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([
[
'task_id' => '<string>',
'prompt' => '<string>',
'support_extra' => true,
'fetch_content' => true,
'include_links' => true
]
]),
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/serp/ai_summary"
payload := strings.NewReader("[\n {\n \"task_id\": \"<string>\",\n \"prompt\": \"<string>\",\n \"support_extra\": true,\n \"fetch_content\": true,\n \"include_links\": true\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/serp/ai_summary")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"task_id\": \"<string>\",\n \"prompt\": \"<string>\",\n \"support_extra\": true,\n \"fetch_content\": true,\n \"include_links\": true\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/dataforseo/serp/ai_summary")
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 \"task_id\": \"<string>\",\n \"prompt\": \"<string>\",\n \"support_extra\": true,\n \"fetch_content\": true,\n \"include_links\": true\n }\n]"
response = http.request(request)
puts response.read_body{
"version": "<string>",
"status_code": 123,
"status_message": "<string>",
"time": "<string>",
"cost": 123,
"tasks": [
"<string>"
],
"tasks[].id": "<string>",
"tasks[].status_code": 123,
"tasks[].status_message": "<string>",
"tasks[].result_count": 123,
"tasks[].path": [
"<string>"
],
"tasks[].data": {},
"tasks[].result": [
"<string>"
],
"tasks[].result[].items_count": 123,
"tasks[].result[].items": [
"<string>"
],
"tasks[].result[].items[].summary": "<string>"
}SERP API AI Summary
Returns the AI overview Google shows above the results for a query on Google.
curl --request POST \
--url https://api.aisa.one/apis/v1/dataforseo/serp/ai_summary \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"task_id": "<string>",
"prompt": "<string>",
"support_extra": true,
"fetch_content": true,
"include_links": true
}
]
'import requests
url = "https://api.aisa.one/apis/v1/dataforseo/serp/ai_summary"
payload = [
{
"task_id": "<string>",
"prompt": "<string>",
"support_extra": True,
"fetch_content": True,
"include_links": True
}
]
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([
{
task_id: '<string>',
prompt: '<string>',
support_extra: true,
fetch_content: true,
include_links: true
}
])
};
fetch('https://api.aisa.one/apis/v1/dataforseo/serp/ai_summary', 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/serp/ai_summary",
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([
[
'task_id' => '<string>',
'prompt' => '<string>',
'support_extra' => true,
'fetch_content' => true,
'include_links' => true
]
]),
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/serp/ai_summary"
payload := strings.NewReader("[\n {\n \"task_id\": \"<string>\",\n \"prompt\": \"<string>\",\n \"support_extra\": true,\n \"fetch_content\": true,\n \"include_links\": true\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/serp/ai_summary")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"task_id\": \"<string>\",\n \"prompt\": \"<string>\",\n \"support_extra\": true,\n \"fetch_content\": true,\n \"include_links\": true\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/dataforseo/serp/ai_summary")
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 \"task_id\": \"<string>\",\n \"prompt\": \"<string>\",\n \"support_extra\": true,\n \"fetch_content\": true,\n \"include_links\": true\n }\n]"
response = http.request(request)
puts response.read_body{
"version": "<string>",
"status_code": 123,
"status_message": "<string>",
"time": "<string>",
"cost": 123,
"tasks": [
"<string>"
],
"tasks[].id": "<string>",
"tasks[].status_code": 123,
"tasks[].status_message": "<string>",
"tasks[].result_count": 123,
"tasks[].path": [
"<string>"
],
"tasks[].data": {},
"tasks[].result": [
"<string>"
],
"tasks[].result[].items_count": 123,
"tasks[].result[].items": [
"<string>"
],
"tasks[].result[].items[].summary": "<string>"
}keyword, type, se_domain, location_code, language_code, check_url, datetime, spell, refinement_chips, item_types, items_count and items. 💰 Measured at 0.002upstreamagainstthe0.012 billed - this family is the cheapest source of search data here, six times under the flat rate. Wrapped in DataForSEO’s envelope: data in tasks[0].result, outcome in tasks[0].status_code - a rejected request still returns HTTP 200.
Example
curl -X POST "https://api.aisa.one/apis/v1/dataforseo/serp/ai_summary" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '[{"task_id": "...", "prompt": "...", "support_extra": "..."}]'
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Unique identifier of the associated task in UUID format; can be used within 30 days
Additional AI prompt; maximum 2000 characters
Whether to consider extra SERP features such as answer_box, knowledge_graph, and featured_snippet; default true
Whether to fetch content from pages in SERPs; default false
Whether to include source links in the summary; default false
Response
Successful response
The current version of the API
General status code
General informational message
Execution time, seconds
Total task cost, USD
Array of tasks
Task identifier in UUID format
Task status code
Task status message
Number of elements in the result array
URL path
Contains the same parameters specified in the POST request
Array of results
Number of items in the result array
Items array
Generated summary