Data API / DataForSEO / SERP
Live Google AI Mode SERP
Returns Google's AI Mode answer for a query, with the sources it cites on Google, synchronously. Returns keyword, type, se_domain, location_code, language_code, check_url, datetime, spell, refinement_chips, item_types, items_count and items. advanced is the default choice; take regular when only the ranked list matters and html only to check what the parser dropped. Wrapped in DataForSEO's envelope: data in tasks[0].result, outcome in tasks[0].status_code - a rejected request still returns HTTP 200.
Параметры
Параметров пути, запроса и заголовков нет.
Тело запроса
keywordstringОбязательныйKeyword; you can specify up to 700 characters
location_codeintegerНеобязательныйSearch engine location code; required if location_name or location_coordinate is not specified
location_namestringНеобязательныйFull name of search engine location; required if location_code or location_coordinate is not specified
location_coordinatestringНеобязательныйGPS coordinates of a location; required if location_name or location_code is not specified
language_namestringНеобязательныйFull name of search engine language; required if language_code is not specified
language_codestringНеобязательныйSearch engine language code; required if language_name is not specified
devicestringНеобязательныйDevice type: desktop or mobile
calculate_rectanglesbooleanНеобязательныйEnable pixel ranking calculations for elements in SERP
browser_screen_widthintegerНеобязательныйCustom browser screen width
browser_screen_heightintegerНеобязательныйCustom browser screen height
browser_screen_resolution_rationumberНеобязательныйScreen resolution ratio for rectangle calculations
Пример запроса
curl -X POST "https://openapi.felo.ai/v1/beta/dataforseo/serp/google/ai_mode/live/advanced" \
-H "Authorization: Bearer $FELO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"keyword": "<string>",
"location_code": 0,
"location_name": "<string>",
"location_coordinate": "<string>",
"language_name": "<string>",
"language_code": "<string>",
"device": "<string>",
"calculate_rectangles": false
}'Ответ
Поля ответа
versionstringНеобязательныйThe current version of the API
status_codeintegerНеобязательныйGeneral status code
status_messagestringНеобязательныйGeneral informational message
timestringНеобязательныйExecution time, seconds
costnumberНеобязательныйTotal tasks cost, USD
tasks_countintegerНеобязательныйThe number of tasks in the tasks array
tasks_errorintegerНеобязательныйThe number of tasks in the tasks array returned with an error
tasksstring[]НеобязательныйArray of tasks
resultstring[]НеобязательныйArray of live SERP results
keywordstringНеобязательныйKeyword received in the POST array
typestringНеобязательныйSearch engine type in the POST array
se_domainstringНеобязательныйSearch engine domain in the POST array
location_codeintegerНеобязательныйLocation code in the POST array
language_codestringНеобязательныйLanguage code in the POST array
check_urlstringНеобязательныйSearch URL with refinement parameters
item_typesstring[]НеобязательныйTypes of search results found in SERP
items_countintegerНеобязательныйNumber of results returned in the items array
itemsstring[]НеобязательныйElements of search results found in SERP