数据 API / DataForSEO / SERP
Setting Google Autocomplete Tasks
Queues the suggestions Google offers as a query is typed on Google, returning a task id in tasks[0].id. Wrapped in DataForSEO's envelope: data in tasks[0].result, outcome in tasks[0].status_code - a rejected request still returns HTTP 200. The live twin answers immediately and is simpler for a single query; queue when the batch would outlast a tool call.
参数
没有路径、查询或请求头参数。
请求体
keywordstring必填Keyword to get autocomplete suggestions for
clientstring可选Search client for autocomplete, such as chrome, chrome-omni, gws-wiz, safari, firefox, img, or youtube
location_namestring可选Full name of search engine location
location_codeinteger可选Search engine location code
language_namestring可选Full name of search engine language
language_codestring可选Search engine language code
priorityinteger可选Task priority
postback_urlstring可选URL for sending task results
pingback_urlstring可选Notification URL of a completed task
postback_datastring可选Postback datatype; possible value: advanced
请求示例
curl -X POST "https://openapi.felo.ai/v1/beta/dataforseo/serp/google/autocomplete/task_post" \
-H "Authorization: Bearer $FELO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"keyword": "<string>",
"client": "<string>",
"location_name": "<string>",
"location_code": 0,
"language_name": "<string>",
"language_code": "<string>",
"priority": 0,
"postback_url": "<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 task objects
idstring可选Task identifier in UUID format
status_codeinteger可选Task status code
status_messagestring可选Task status message
costnumber可选Cost of the task, USD
result_countinteger可选Number of elements in the result array