跳转到主要内容
POST
https://api.aisa.one/apis/v1
/
dataforseo
/
keywords_data
/
bing
/
keywords_for_keywords
/
live
设置实时“关键词的相关关键词”任务
curl --request POST \
  --url https://api.aisa.one/apis/v1/dataforseo/keywords_data/bing/keywords_for_keywords/live \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "keywords": [
    "<string>"
  ],
  "location_name": "<string>",
  "location_code": 123,
  "location_coordinate": "<string>",
  "language_name": "<string>",
  "language_code": "<string>",
  "sort_by": "<string>",
  "keywords_negative": [
    "<string>"
  ],
  "device": "<string>",
  "date_from": "<string>",
  "date_to": "<string>",
  "search_partners": true,
  "tag": "<string>"
}
'
import requests

url = "https://api.aisa.one/apis/v1/dataforseo/keywords_data/bing/keywords_for_keywords/live"

payload = {
"keywords": ["<string>"],
"location_name": "<string>",
"location_code": 123,
"location_coordinate": "<string>",
"language_name": "<string>",
"language_code": "<string>",
"sort_by": "<string>",
"keywords_negative": ["<string>"],
"device": "<string>",
"date_from": "<string>",
"date_to": "<string>",
"search_partners": True,
"tag": "<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({
keywords: ['<string>'],
location_name: '<string>',
location_code: 123,
location_coordinate: '<string>',
language_name: '<string>',
language_code: '<string>',
sort_by: '<string>',
keywords_negative: ['<string>'],
device: '<string>',
date_from: '<string>',
date_to: '<string>',
search_partners: true,
tag: '<string>'
})
};

fetch('https://api.aisa.one/apis/v1/dataforseo/keywords_data/bing/keywords_for_keywords/live', 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/keywords_for_keywords/live",
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([
'keywords' => [
'<string>'
],
'location_name' => '<string>',
'location_code' => 123,
'location_coordinate' => '<string>',
'language_name' => '<string>',
'language_code' => '<string>',
'sort_by' => '<string>',
'keywords_negative' => [
'<string>'
],
'device' => '<string>',
'date_from' => '<string>',
'date_to' => '<string>',
'search_partners' => true,
'tag' => '<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/keywords_for_keywords/live"

payload := strings.NewReader("{\n \"keywords\": [\n \"<string>\"\n ],\n \"location_name\": \"<string>\",\n \"location_code\": 123,\n \"location_coordinate\": \"<string>\",\n \"language_name\": \"<string>\",\n \"language_code\": \"<string>\",\n \"sort_by\": \"<string>\",\n \"keywords_negative\": [\n \"<string>\"\n ],\n \"device\": \"<string>\",\n \"date_from\": \"<string>\",\n \"date_to\": \"<string>\",\n \"search_partners\": true,\n \"tag\": \"<string>\"\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/keywords_for_keywords/live")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"keywords\": [\n \"<string>\"\n ],\n \"location_name\": \"<string>\",\n \"location_code\": 123,\n \"location_coordinate\": \"<string>\",\n \"language_name\": \"<string>\",\n \"language_code\": \"<string>\",\n \"sort_by\": \"<string>\",\n \"keywords_negative\": [\n \"<string>\"\n ],\n \"device\": \"<string>\",\n \"date_from\": \"<string>\",\n \"date_to\": \"<string>\",\n \"search_partners\": true,\n \"tag\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.aisa.one/apis/v1/dataforseo/keywords_data/bing/keywords_for_keywords/live")

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 \"keywords\": [\n \"<string>\"\n ],\n \"location_name\": \"<string>\",\n \"location_code\": 123,\n \"location_coordinate\": \"<string>\",\n \"language_name\": \"<string>\",\n \"language_code\": \"<string>\",\n \"sort_by\": \"<string>\",\n \"keywords_negative\": [\n \"<string>\"\n ],\n \"device\": \"<string>\",\n \"date_from\": \"<string>\",\n \"date_to\": \"<string>\",\n \"search_partners\": true,\n \"tag\": \"<string>\"\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>"
  ],
  "tasks.result.keyword": "<string>",
  "tasks.result.location_code": 123,
  "tasks.result.language_code": "<string>",
  "tasks.result.search_partners": true,
  "tasks.result.device": "<string>",
  "tasks.result.competition": 123,
  "tasks.result.cpc": 123,
  "tasks.result.search_volume": 123,
  "tasks.result.categories": [
    "<string>"
  ],
  "tasks.result.monthly_searches": [
    "<string>"
  ],
  "tasks.result.monthly_searches.year": 123,
  "tasks.result.monthly_searches.month": 123,
  "tasks.result.monthly_searches.search_volume": 123
}

授权

Authorization
string
header
必填

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

请求体

application/json
keywords
string[]
必填

关键词 必填字段 最多可指定 200 个关键词,每个关键词不得超过 100 个字符;指定的关键词将转换为小写,数据将在单独的数组中提供;有关 DataForSEO API 中 keyword 和 keywords 字段的规则与限制,请参阅此帮助中心文章

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”格式;将提供指定坐标所属国家/地区的数据;示例:52.6178549,-155.352142

language_name
string
必填

搜索引擎语言的全名。如果未指定 language_code,则此字段为必填字段。如果使用此字段,则无需指定 language_code。支持的语言:英语、法语、德语

language_code
string
必填

搜索引擎语言代码。如果未指定 language_name,则此字段为必填字段;如果使用此字段,则无需指定 language_name。支持的语言:en、fr、de

sort_by
string

结果排序参数,可选字段。使用这些参数可按 search_volume、cpc、competition 或 relevance 对结果进行降序排序。默认值:relevance

keywords_negative
string[]

否定关键词数组,可选字段;这些关键词将在结果数组中被忽略;最多可以指定 200 个要从结果中排除的词;指定的关键词将转换为小写格式

device
string

设备类型,可选字段。如果要获取特定设备类型的数据,请指定此字段;可能的值:all、mobile、desktop、tablet;默认值:all

date_from
string

时间范围的起始日期;可选字段;最小值:自今天起向前 24 个月;如果未指定此字段,将提供最近 12 个月的数据;日期格式:"yyyy-mm-dd";示例:"2020-01-01";注意:不建议对过去一年的日期使用自定义时间范围

date_to
string

时间范围的结束日期;可选字段。如果未指定此字段,将提供过去 12 个月的数据;最小值:自今天起向前两年;最大值:自今天起一个月;日期格式:"yyyy-mm-dd";示例:"2020-03-15"。注意:不建议对过去一年的日期使用自定义时间范围

search_partners
boolean

Bing 搜索合作伙伴类型,可选字段。如果指定 true,则会返回 Bing、Yahoo、AOL 的自有、运营及联合网络,以及托管 Bing、AOL 和 Yahoo 搜索的合作伙伴网站的结果。默认值:false – 返回 Bing、AOL 和 Yahoo 搜索网络的结果

tag
string

用户定义的任务标识符。可选字段。字符数限制为 255。您可以使用此参数标识任务并将其与结果匹配;您将在响应的 data 对象中找到指定的 tag 值

响应

成功响应

version
string

API 的当前版本

status_code
integer

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

status_message
string

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

time
string

执行时间(秒)

cost
number

任务总成本(美元)

tasks_count
integer

tasks 数组中的任务数量

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[]

结果数组

tasks.result.keyword
string

POST 数组中的关键词

tasks.result.location_code
integer

POST 数组中的位置代码;如果没有数据,则值为 null

tasks.result.language_code
string

POST 数组中的语言代码;如果没有数据,则值为 null

tasks.result.search_partners
boolean

指示响应中是否包含来自合作伙伴网络的数据

tasks.result.device
string

设备类型,指示数据适用的设备类型;可能的值:all、mobile、desktop、tablet

tasks.result.competition
number

competition 表示给定关键词在付费 SERP 中的相对竞争程度。此值基于 Bing Ads 数据。可用值:0.1、0.5、0.9。0.1 – 低竞争,0.5 – 中等竞争,0.9 – 高竞争;如果没有数据,该值为 null

tasks.result.cpc
number

每次点击费用表示过去为该关键词支付的平均每次点击费用(USD)。如果没有数据,则该值为 null

tasks.result.search_volume
integer

月平均搜索量 表示该关键词在 Bing 搜索引擎上的(近似)搜索次数,具体取决于用户的定向设置 搜索量会四舍五入为最接近的十进制值 如果没有数据,则值为 null

tasks.result.categories
string[]

产品和服务类别的旧版字段,其值始终为 null

tasks.result.monthly_searches
string[]

月度搜索量表示此关键词的(近似)搜索次数(提供过去十二个月的数据),并以指定的地理位置为目标。如果没有数据,则值为 null

tasks.result.monthly_searches.year
integer

tasks.result.monthly_searches.month
integer

tasks.result.monthly_searches.search_volume
integer

月均搜索量比率,搜索量四舍五入到最接近的小数值