curl --request POST \
--url https://api.aisa.one/apis/v1/dataforseo/serp/google/events/task_post \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"keyword": "<string>",
"language_code": "<string>",
"language_name": "<string>",
"location_code": 123,
"location_coordinate": "<string>",
"location_name": "<string>",
"pingback_url": "<string>",
"postback_data": "<string>",
"postback_url": "<string>",
"priority": 123
}
]
'import requests
url = "https://api.aisa.one/apis/v1/dataforseo/serp/google/events/task_post"
payload = [
{
"keyword": "<string>",
"language_code": "<string>",
"language_name": "<string>",
"location_code": 123,
"location_coordinate": "<string>",
"location_name": "<string>",
"pingback_url": "<string>",
"postback_data": "<string>",
"postback_url": "<string>",
"priority": 123
}
]
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([
{
keyword: '<string>',
language_code: '<string>',
language_name: '<string>',
location_code: 123,
location_coordinate: '<string>',
location_name: '<string>',
pingback_url: '<string>',
postback_data: '<string>',
postback_url: '<string>',
priority: 123
}
])
};
fetch('https://api.aisa.one/apis/v1/dataforseo/serp/google/events/task_post', 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/google/events/task_post",
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([
[
'keyword' => '<string>',
'language_code' => '<string>',
'language_name' => '<string>',
'location_code' => 123,
'location_coordinate' => '<string>',
'location_name' => '<string>',
'pingback_url' => '<string>',
'postback_data' => '<string>',
'postback_url' => '<string>',
'priority' => 123
]
]),
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/google/events/task_post"
payload := strings.NewReader("[\n {\n \"keyword\": \"<string>\",\n \"language_code\": \"<string>\",\n \"language_name\": \"<string>\",\n \"location_code\": 123,\n \"location_coordinate\": \"<string>\",\n \"location_name\": \"<string>\",\n \"pingback_url\": \"<string>\",\n \"postback_data\": \"<string>\",\n \"postback_url\": \"<string>\",\n \"priority\": 123\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/google/events/task_post")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"keyword\": \"<string>\",\n \"language_code\": \"<string>\",\n \"language_name\": \"<string>\",\n \"location_code\": 123,\n \"location_coordinate\": \"<string>\",\n \"location_name\": \"<string>\",\n \"pingback_url\": \"<string>\",\n \"postback_data\": \"<string>\",\n \"postback_url\": \"<string>\",\n \"priority\": 123\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/dataforseo/serp/google/events/task_post")
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 \"keyword\": \"<string>\",\n \"language_code\": \"<string>\",\n \"language_name\": \"<string>\",\n \"location_code\": 123,\n \"location_coordinate\": \"<string>\",\n \"location_name\": \"<string>\",\n \"pingback_url\": \"<string>\",\n \"postback_data\": \"<string>\",\n \"postback_url\": \"<string>\",\n \"priority\": 123\n }\n]"
response = http.request(request)
puts response.read_body{
"cost": 123,
"status_code": 123,
"status_message": "<string>",
"tasks": [
"<string>"
],
"tasks[].cost": 123,
"tasks[].id": "<string>",
"tasks[].result_count": 123,
"tasks[].status_code": 123,
"tasks[].status_message": "<string>",
"tasks_count": 123,
"tasks_error": 123,
"time": "<string>",
"version": "<string>"
}Setting Google Events SERP Tasks
Queues the events Google surfaces for a query on Google, returning a task id in tasks[0].
curl --request POST \
--url https://api.aisa.one/apis/v1/dataforseo/serp/google/events/task_post \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"keyword": "<string>",
"language_code": "<string>",
"language_name": "<string>",
"location_code": 123,
"location_coordinate": "<string>",
"location_name": "<string>",
"pingback_url": "<string>",
"postback_data": "<string>",
"postback_url": "<string>",
"priority": 123
}
]
'import requests
url = "https://api.aisa.one/apis/v1/dataforseo/serp/google/events/task_post"
payload = [
{
"keyword": "<string>",
"language_code": "<string>",
"language_name": "<string>",
"location_code": 123,
"location_coordinate": "<string>",
"location_name": "<string>",
"pingback_url": "<string>",
"postback_data": "<string>",
"postback_url": "<string>",
"priority": 123
}
]
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([
{
keyword: '<string>',
language_code: '<string>',
language_name: '<string>',
location_code: 123,
location_coordinate: '<string>',
location_name: '<string>',
pingback_url: '<string>',
postback_data: '<string>',
postback_url: '<string>',
priority: 123
}
])
};
fetch('https://api.aisa.one/apis/v1/dataforseo/serp/google/events/task_post', 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/google/events/task_post",
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([
[
'keyword' => '<string>',
'language_code' => '<string>',
'language_name' => '<string>',
'location_code' => 123,
'location_coordinate' => '<string>',
'location_name' => '<string>',
'pingback_url' => '<string>',
'postback_data' => '<string>',
'postback_url' => '<string>',
'priority' => 123
]
]),
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/google/events/task_post"
payload := strings.NewReader("[\n {\n \"keyword\": \"<string>\",\n \"language_code\": \"<string>\",\n \"language_name\": \"<string>\",\n \"location_code\": 123,\n \"location_coordinate\": \"<string>\",\n \"location_name\": \"<string>\",\n \"pingback_url\": \"<string>\",\n \"postback_data\": \"<string>\",\n \"postback_url\": \"<string>\",\n \"priority\": 123\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/google/events/task_post")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"keyword\": \"<string>\",\n \"language_code\": \"<string>\",\n \"language_name\": \"<string>\",\n \"location_code\": 123,\n \"location_coordinate\": \"<string>\",\n \"location_name\": \"<string>\",\n \"pingback_url\": \"<string>\",\n \"postback_data\": \"<string>\",\n \"postback_url\": \"<string>\",\n \"priority\": 123\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/dataforseo/serp/google/events/task_post")
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 \"keyword\": \"<string>\",\n \"language_code\": \"<string>\",\n \"language_name\": \"<string>\",\n \"location_code\": 123,\n \"location_coordinate\": \"<string>\",\n \"location_name\": \"<string>\",\n \"pingback_url\": \"<string>\",\n \"postback_data\": \"<string>\",\n \"postback_url\": \"<string>\",\n \"priority\": 123\n }\n]"
response = http.request(request)
puts response.read_body{
"cost": 123,
"status_code": 123,
"status_message": "<string>",
"tasks": [
"<string>"
],
"tasks[].cost": 123,
"tasks[].id": "<string>",
"tasks[].result_count": 123,
"tasks[].status_code": 123,
"tasks[].status_message": "<string>",
"tasks_count": 123,
"tasks_error": 123,
"time": "<string>",
"version": "<string>"
}id in tasks[0].id. The charge lands here; fetching is free, including re-fetching. 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.
Example
curl -X POST "https://api.aisa.one/apis/v1/dataforseo/serp/google/events/task_post" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '[{"keyword": "...", "location_code": "...", "location_name": "..."}]'
Request contract
- Method and path: POST /apis/v1/dataforseo/serp/google/events/task_post
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/dataforseo/serp/google/events/task_post - Runtime facts: 6ab8fec17df1d5dcdff2e036dd1eb40587752b774ec040ab4eb0cc6946c3dd3c
{
"operationId": "post_dataforseo_serp_google_events_submit",
"method": "POST",
"path": "/apis/v1/dataforseo/serp/google/events/task_post",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"items": {
"properties": {
"keyword": {
"description": "Keyword to search for",
"type": "string"
},
"language_code": {
"description": "Search engine language code",
"type": "string"
},
"language_name": {
"description": "Full name of search engine language",
"type": "string"
},
"location_code": {
"description": "Search engine location code",
"type": "integer"
},
"location_coordinate": {
"description": "GPS coordinates of a location",
"type": "string"
},
"location_name": {
"description": "Full name of search engine location",
"type": "string"
},
"pingback_url": {
"description": "Notification URL of a completed task",
"type": "string"
},
"postback_data": {
"description": "Postback datatype",
"type": "string"
},
"postback_url": {
"description": "URL for sending task results",
"type": "string"
},
"priority": {
"description": "Task priority",
"type": "integer"
}
},
"required": [
"keyword"
],
"type": "object"
},
"type": "array"
}
}
},
"required": true
},
"x-aisa-status": "enabled",
"x-aisa-pricing": {
"cost_contract": "response_usd",
"customer_multiplier": 1.0,
"customer_pricing": "provider_cost_multiplier",
"default_request_estimate_usd": 0.02,
"estimate_source": "profile_seed",
"evidence_source": "response_body"
},
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
Usage-based billing; Default request estimate: $0.02 USD (not a fixed price). Account-specific pricing and final settlement may differ. Published reference values are not an account-specific quote or a settled charge. For endpoints supporting X-AISA-Cost-Mode: quote, obtain a free quote for your exact request before execution; reconcile the settled cost with response metadata and Usage Logs. USD amounts use 1,000,000 integer micro-USD per dollar.- Default request reference estimate (USD): 0.02
- Cost contract: response_usd
- Published reference multiplier: 1.0
- Settlement evidence source: response_body
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Keyword to search for
Search engine language code
Full name of search engine language
Search engine location code
GPS coordinates of a location
Full name of search engine location
Notification URL of a completed task
Postback datatype
URL for sending task results
Task priority
Response
Successful response
Total tasks cost, USD
General status code
General informational message
Array of task objects
Cost of the task, USD
Task identifier in UUID format
Number of elements in the result array
Task status code
Task status message
The number of tasks in the tasks array
The number of tasks in the tasks array returned with an error
Execution time, seconds
The current version of the API