跳转到主要内容
POST
https://api.aisa.one/apis/v1
/
dataforseo
/
keywords_data
/
bing
/
audience_estimation
/
task_post
设置“Bing Ads 受众估算”任务
curl --request POST \
  --url https://api.aisa.one/apis/v1/dataforseo/keywords_data/bing/audience_estimation/task_post \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "location_name": "<string>",
  "location_code": 123,
  "location_coordinate": "<string>",
  "age": [
    "<string>"
  ],
  "bid": 123,
  "daily_budget": 123,
  "gender": [
    "<string>"
  ],
  "industry": [
    "<string>"
  ],
  "job_function": [
    "<string>"
  ]
}
'
import requests

url = "https://api.aisa.one/apis/v1/dataforseo/keywords_data/bing/audience_estimation/task_post"

payload = {
"location_name": "<string>",
"location_code": 123,
"location_coordinate": "<string>",
"age": ["<string>"],
"bid": 123,
"daily_budget": 123,
"gender": ["<string>"],
"industry": ["<string>"],
"job_function": ["<string>"]
}
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({
location_name: '<string>',
location_code: 123,
location_coordinate: '<string>',
age: ['<string>'],
bid: 123,
daily_budget: 123,
gender: ['<string>'],
industry: ['<string>'],
job_function: ['<string>']
})
};

fetch('https://api.aisa.one/apis/v1/dataforseo/keywords_data/bing/audience_estimation/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/keywords_data/bing/audience_estimation/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([
'location_name' => '<string>',
'location_code' => 123,
'location_coordinate' => '<string>',
'age' => [
'<string>'
],
'bid' => 123,
'daily_budget' => 123,
'gender' => [
'<string>'
],
'industry' => [
'<string>'
],
'job_function' => [
'<string>'
]
]),
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/keywords_data/bing/audience_estimation/task_post"

payload := strings.NewReader("{\n \"location_name\": \"<string>\",\n \"location_code\": 123,\n \"location_coordinate\": \"<string>\",\n \"age\": [\n \"<string>\"\n ],\n \"bid\": 123,\n \"daily_budget\": 123,\n \"gender\": [\n \"<string>\"\n ],\n \"industry\": [\n \"<string>\"\n ],\n \"job_function\": [\n \"<string>\"\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/keywords_data/bing/audience_estimation/task_post")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"location_name\": \"<string>\",\n \"location_code\": 123,\n \"location_coordinate\": \"<string>\",\n \"age\": [\n \"<string>\"\n ],\n \"bid\": 123,\n \"daily_budget\": 123,\n \"gender\": [\n \"<string>\"\n ],\n \"industry\": [\n \"<string>\"\n ],\n \"job_function\": [\n \"<string>\"\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.aisa.one/apis/v1/dataforseo/keywords_data/bing/audience_estimation/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 \"location_name\": \"<string>\",\n \"location_code\": 123,\n \"location_coordinate\": \"<string>\",\n \"age\": [\n \"<string>\"\n ],\n \"bid\": 123,\n \"daily_budget\": 123,\n \"gender\": [\n \"<string>\"\n ],\n \"industry\": [\n \"<string>\"\n ],\n \"job_function\": [\n \"<string>\"\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "version": "<string>",
  "status_code": 123,
  "status_message": "<string>",
  "time": "<string>",
  "cost": 123,
  "tasks_count": 123,
  "tasks_error": 123,
  "tasks": [
    "<string>"
  ],
  "tasks.id": "<string>",
  "tasks.status_code": 123,
  "tasks.status_message": "<string>",
  "tasks.time": "<string>",
  "tasks.cost": 123,
  "tasks.result_count": 123,
  "tasks.path": [
    "<string>"
  ],
  "tasks.data": {},
  "tasks.result": [
    "<string>"
  ]
}

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
location_name
string
必填

搜索引擎位置的完整名称。如果未指定 location_code 或 location_coordinate,则此字段为必填字段。如果使用此字段,则无需指定 location_code 或 location_coordinate。您可以单独请求 https://api.dataforseo.com/v3/keywords_data/bing/locations,获取搜索引擎的可用位置及其 location_name 列表。示例:London,England,United Kingdom

location_code
integer
必填

搜索引擎位置代码。如果未指定 location_name 或 location_coordinate,则为必填字段。如果使用此字段,则无需指定 location_name 或 location_coordinate。可通过向 https://api.dataforseo.com/v3/keywords_data/bing/locations 单独发送请求,获取搜索引擎的可用位置及其 location_code。示例:2840

location_coordinate
string
必填

位置的 GPS 坐标。如果未指定 location_name 或 location_code,则为必填字段。如果使用此字段,则无需指定 location_name 或 location_code。location_coordinate 参数应采用“latitude,longitude,radius(单位:km)”格式。将提供指定坐标所属国家/地区的数据。示例:29.6821525,-82.4098881,100

age
string[]

选择用于定向的年龄范围;可能的值:eighteen_to_twenty_four, fifty_to_sixty_four, sixty_five_and_above, thirteen_to_seventeen, thirty_five_to_forty_nine, twenty_five_to_thirty_four, unknown, zero_to_twelve

bid
number

所需的出价设置值(美元),最大值:1000

daily_budget
number

每日广告活动预算值(美元),最大值:10000

gender
string[]

目标性别,可选值:male、female、unknown

industry
string[]

LinkedIn 个人资料定向的行业;如果使用此字段,可向 https://api.dataforseo.com/v3/keywords_data/bing/audience_estimation/industries 单独发出请求,以获取包含 industry_id 的可用行业名称列表。示例:806301758

job_function
string[]

LinkedIn 个人资料定向的职位职能;如果使用此字段,可以通过向 https://api.dataforseo.com/v3/keywords_data/bing/audience_estimation/job_functions 单独发出请求,获取包含 job_function_id 的可用职位职能名称列表;示例:806300451

响应

成功响应

version
string

API 的当前版本

status_code
integer

通用状态码;您可以在此处查看完整的响应码列表。注意:我们强烈建议设计必要的系统来处理相关异常或错误情况

status_message
string

常规信息消息;可在此处查看常规信息消息的完整列表

time
string

执行时间(秒)

cost
number

任务总成本(美元)

tasks_count
integer

tasksarray 中的任务数量

tasks_error
integer

返回错误的 tasks 数组中的任务数量

tasks
string[]

任务数组

tasks.id
string

系统中的唯一任务标识符,采用 UUID 格式

tasks.status_code
integer

DataForSEO 生成的任务状态码;取值范围为:10000-60000,完整的响应码列表可在此处查看

tasks.status_message
string

任务的信息性消息,你可以在此处查看通用信息性消息的完整列表

tasks.time
string

执行时间(秒)

tasks.cost
number

任务成本(美元)

tasks.result_count
integer

结果数组中的元素数量

tasks.path
string[]

URL 路径

tasks.data
object

包含您在 POST 请求中指定的相同参数

tasks.result
string[]

结果数组;在此情况下,该值将为 null