Data API / DataForSEO / SERP
SERP API AI Summary
Returns the AI overview Google shows above the results for a query on Google. Returns keyword, type, se_domain, location_code, language_code, check_url, datetime, spell, refinement_chips, item_types, items_count and items. Wrapped in DataForSEO's envelope: data in tasks[0].result, outcome in tasks[0].status_code - a rejected request still returns HTTP 200.
Параметры
Параметров пути, запроса и заголовков нет.
Тело запроса
task_idstringОбязательныйUnique identifier of the associated task in UUID format; can be used within 30 days
promptstringНеобязательныйAdditional AI prompt; maximum 2000 characters
support_extrabooleanНеобязательныйWhether to consider extra SERP features such as answer_box, knowledge_graph, and featured_snippet; default true
fetch_contentbooleanНеобязательныйWhether to fetch content from pages in SERPs; default false
include_linksbooleanНеобязательныйWhether to include source links in the summary; default false
Пример запроса
curl -X POST "https://openapi.felo.ai/v1/beta/dataforseo/serp/ai_summary" \
-H "Authorization: Bearer $FELO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"task_id": "<string>",
"prompt": "<string>",
"support_extra": false,
"fetch_content": false,
"include_links": false
}'Ответ
Поля ответа
versionstringНеобязательныйThe current version of the API
status_codeintegerНеобязательныйGeneral status code
status_messagestringНеобязательныйGeneral informational message
timestringНеобязательныйExecution time, seconds
costnumberНеобязательныйTotal task cost, USD
tasksstring[]НеобязательныйArray of tasks
idstringНеобязательныйTask identifier in UUID format
status_codeintegerНеобязательныйTask status code
status_messagestringНеобязательныйTask status message
result_countintegerНеобязательныйNumber of elements in the result array
pathstring[]НеобязательныйURL path
dataobjectНеобязательныйContains the same parameters specified in the POST request
resultstring[]НеобязательныйArray of results
items_countintegerНеобязательныйNumber of items in the result array
itemsstring[]НеобязательныйItems array
summarystringНеобязательныйGenerated summary