数据 API / DataForSEO / SERP
Live Google Ai Mode SERP HTML
Returns Google's AI Mode answer for a query, with the sources it cites on Google, synchronously. Raw page source rather than parsed results. 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_namestring可选Full name of search engine location; required if location_code or location_coordinate is not specified
location_codeinteger可选Search engine location code; required if location_name 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
请求示例
curl -X POST "https://openapi.felo.ai/v1/beta/dataforseo/serp/google/ai_mode/live/html" \
-H "Authorization: Bearer $FELO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"keyword": "<string>",
"location_name": "<string>",
"location_code": 0,
"location_coordinate": "<string>",
"language_name": "<string>",
"language_code": "<string>",
"device": "<string>"
}'响应
响应字段
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
idstring可选Task identifier
status_codeinteger可选Task status code
status_messagestring可选Task status message
timestring可选Execution time, seconds
costnumber可选Cost of the task, USD
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 HTML 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