curl --request POST \
--url https://api.birdeye.com/resources/v1/competitors/competitive-insight/keywords/{businessNumber} \
--header 'Content-Type: application/json' \
--data '
{
"sourceType": "review",
"sources": [
"google",
"citysearch"
],
"startDate": "11/02/2020",
"endDate": "01/06/2021",
"competitors": [
{
"competitorId": 530846,
"compAccountIds": [
162426,
144352
]
},
{
"competitorId": 720708,
"compAccountIds": [
165432
]
}
],
"topKW": 25,
"topAd": 10,
"orderBy": "ztoa",
"sentiment": -1
}
'import requests
url = "https://api.birdeye.com/resources/v1/competitors/competitive-insight/keywords/{businessNumber}"
payload = {
"sourceType": "review",
"sources": ["google", "citysearch"],
"startDate": "11/02/2020",
"endDate": "01/06/2021",
"competitors": [
{
"competitorId": 530846,
"compAccountIds": [162426, 144352]
},
{
"competitorId": 720708,
"compAccountIds": [165432]
}
],
"topKW": 25,
"topAd": 10,
"orderBy": "ztoa",
"sentiment": -1
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
sourceType: 'review',
sources: ['google', 'citysearch'],
startDate: '11/02/2020',
endDate: '01/06/2021',
competitors: [
{competitorId: 530846, compAccountIds: [162426, 144352]},
{competitorId: 720708, compAccountIds: [165432]}
],
topKW: 25,
topAd: 10,
orderBy: 'ztoa',
sentiment: -1
})
};
fetch('https://api.birdeye.com/resources/v1/competitors/competitive-insight/keywords/{businessNumber}', 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.birdeye.com/resources/v1/competitors/competitive-insight/keywords/{businessNumber}",
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([
'sourceType' => 'review',
'sources' => [
'google',
'citysearch'
],
'startDate' => '11/02/2020',
'endDate' => '01/06/2021',
'competitors' => [
[
'competitorId' => 530846,
'compAccountIds' => [
162426,
144352
]
],
[
'competitorId' => 720708,
'compAccountIds' => [
165432
]
]
],
'topKW' => 25,
'topAd' => 10,
'orderBy' => 'ztoa',
'sentiment' => -1
]),
CURLOPT_HTTPHEADER => [
"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.birdeye.com/resources/v1/competitors/competitive-insight/keywords/{businessNumber}"
payload := strings.NewReader("{\n \"sourceType\": \"review\",\n \"sources\": [\n \"google\",\n \"citysearch\"\n ],\n \"startDate\": \"11/02/2020\",\n \"endDate\": \"01/06/2021\",\n \"competitors\": [\n {\n \"competitorId\": 530846,\n \"compAccountIds\": [\n 162426,\n 144352\n ]\n },\n {\n \"competitorId\": 720708,\n \"compAccountIds\": [\n 165432\n ]\n }\n ],\n \"topKW\": 25,\n \"topAd\": 10,\n \"orderBy\": \"ztoa\",\n \"sentiment\": -1\n}")
req, _ := http.NewRequest("POST", url, payload)
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.birdeye.com/resources/v1/competitors/competitive-insight/keywords/{businessNumber}")
.header("Content-Type", "application/json")
.body("{\n \"sourceType\": \"review\",\n \"sources\": [\n \"google\",\n \"citysearch\"\n ],\n \"startDate\": \"11/02/2020\",\n \"endDate\": \"01/06/2021\",\n \"competitors\": [\n {\n \"competitorId\": 530846,\n \"compAccountIds\": [\n 162426,\n 144352\n ]\n },\n {\n \"competitorId\": 720708,\n \"compAccountIds\": [\n 165432\n ]\n }\n ],\n \"topKW\": 25,\n \"topAd\": 10,\n \"orderBy\": \"ztoa\",\n \"sentiment\": -1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.birdeye.com/resources/v1/competitors/competitive-insight/keywords/{businessNumber}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"sourceType\": \"review\",\n \"sources\": [\n \"google\",\n \"citysearch\"\n ],\n \"startDate\": \"11/02/2020\",\n \"endDate\": \"01/06/2021\",\n \"competitors\": [\n {\n \"competitorId\": 530846,\n \"compAccountIds\": [\n 162426,\n 144352\n ]\n },\n {\n \"competitorId\": 720708,\n \"compAccountIds\": [\n 165432\n ]\n }\n ],\n \"topKW\": 25,\n \"topAd\": 10,\n \"orderBy\": \"ztoa\",\n \"sentiment\": -1\n}"
response = http.request(request)
puts response.read_body{
"id": 119468,
"name": "Social Stress",
"keywords": [
"experience"
],
"ct": 27159,
"avgScr": 1,
"keywordStats": [
{
"keyword": "experience",
"occurences": 27158,
"score": 1,
"scr": 27158
},
{
"keyword": "lady",
"occurences": 2186,
"score": 1,
"scr": 2186
}
],
"negKWAdjectives": [
{
"adjective": "horrible",
"occurences": 4137,
"avgScore": 1,
"prcnt": 15.232519
}
],
"competitors": [
{
"id": 159180,
"name": "Online Competitors",
"keywords": [
"experience"
],
"ct": 1176,
"avgScr": 1,
"keywordStats": [
{
"keyword": "problem",
"occurences": 2972,
"score": 1,
"scr": 2972
}
],
"negKWAdjectives": [
{
"adjective": "bad",
"occurences": 340,
"avgScore": 1,
"prcnt": 28.911564
}
]
}
]
}{
"code": 1161,
"message": "Invalid API key"
}{
"code": 1011,
"message": "Business id is invalid"
}{
"code": 89,
"message": "Rate limit exceeded"
}Competitive Insight Keywords
Get Keyword Statistics retrieves Insights keywords details for a competitor.
curl --request POST \
--url https://api.birdeye.com/resources/v1/competitors/competitive-insight/keywords/{businessNumber} \
--header 'Content-Type: application/json' \
--data '
{
"sourceType": "review",
"sources": [
"google",
"citysearch"
],
"startDate": "11/02/2020",
"endDate": "01/06/2021",
"competitors": [
{
"competitorId": 530846,
"compAccountIds": [
162426,
144352
]
},
{
"competitorId": 720708,
"compAccountIds": [
165432
]
}
],
"topKW": 25,
"topAd": 10,
"orderBy": "ztoa",
"sentiment": -1
}
'import requests
url = "https://api.birdeye.com/resources/v1/competitors/competitive-insight/keywords/{businessNumber}"
payload = {
"sourceType": "review",
"sources": ["google", "citysearch"],
"startDate": "11/02/2020",
"endDate": "01/06/2021",
"competitors": [
{
"competitorId": 530846,
"compAccountIds": [162426, 144352]
},
{
"competitorId": 720708,
"compAccountIds": [165432]
}
],
"topKW": 25,
"topAd": 10,
"orderBy": "ztoa",
"sentiment": -1
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
sourceType: 'review',
sources: ['google', 'citysearch'],
startDate: '11/02/2020',
endDate: '01/06/2021',
competitors: [
{competitorId: 530846, compAccountIds: [162426, 144352]},
{competitorId: 720708, compAccountIds: [165432]}
],
topKW: 25,
topAd: 10,
orderBy: 'ztoa',
sentiment: -1
})
};
fetch('https://api.birdeye.com/resources/v1/competitors/competitive-insight/keywords/{businessNumber}', 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.birdeye.com/resources/v1/competitors/competitive-insight/keywords/{businessNumber}",
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([
'sourceType' => 'review',
'sources' => [
'google',
'citysearch'
],
'startDate' => '11/02/2020',
'endDate' => '01/06/2021',
'competitors' => [
[
'competitorId' => 530846,
'compAccountIds' => [
162426,
144352
]
],
[
'competitorId' => 720708,
'compAccountIds' => [
165432
]
]
],
'topKW' => 25,
'topAd' => 10,
'orderBy' => 'ztoa',
'sentiment' => -1
]),
CURLOPT_HTTPHEADER => [
"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.birdeye.com/resources/v1/competitors/competitive-insight/keywords/{businessNumber}"
payload := strings.NewReader("{\n \"sourceType\": \"review\",\n \"sources\": [\n \"google\",\n \"citysearch\"\n ],\n \"startDate\": \"11/02/2020\",\n \"endDate\": \"01/06/2021\",\n \"competitors\": [\n {\n \"competitorId\": 530846,\n \"compAccountIds\": [\n 162426,\n 144352\n ]\n },\n {\n \"competitorId\": 720708,\n \"compAccountIds\": [\n 165432\n ]\n }\n ],\n \"topKW\": 25,\n \"topAd\": 10,\n \"orderBy\": \"ztoa\",\n \"sentiment\": -1\n}")
req, _ := http.NewRequest("POST", url, payload)
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.birdeye.com/resources/v1/competitors/competitive-insight/keywords/{businessNumber}")
.header("Content-Type", "application/json")
.body("{\n \"sourceType\": \"review\",\n \"sources\": [\n \"google\",\n \"citysearch\"\n ],\n \"startDate\": \"11/02/2020\",\n \"endDate\": \"01/06/2021\",\n \"competitors\": [\n {\n \"competitorId\": 530846,\n \"compAccountIds\": [\n 162426,\n 144352\n ]\n },\n {\n \"competitorId\": 720708,\n \"compAccountIds\": [\n 165432\n ]\n }\n ],\n \"topKW\": 25,\n \"topAd\": 10,\n \"orderBy\": \"ztoa\",\n \"sentiment\": -1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.birdeye.com/resources/v1/competitors/competitive-insight/keywords/{businessNumber}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"sourceType\": \"review\",\n \"sources\": [\n \"google\",\n \"citysearch\"\n ],\n \"startDate\": \"11/02/2020\",\n \"endDate\": \"01/06/2021\",\n \"competitors\": [\n {\n \"competitorId\": 530846,\n \"compAccountIds\": [\n 162426,\n 144352\n ]\n },\n {\n \"competitorId\": 720708,\n \"compAccountIds\": [\n 165432\n ]\n }\n ],\n \"topKW\": 25,\n \"topAd\": 10,\n \"orderBy\": \"ztoa\",\n \"sentiment\": -1\n}"
response = http.request(request)
puts response.read_body{
"id": 119468,
"name": "Social Stress",
"keywords": [
"experience"
],
"ct": 27159,
"avgScr": 1,
"keywordStats": [
{
"keyword": "experience",
"occurences": 27158,
"score": 1,
"scr": 27158
},
{
"keyword": "lady",
"occurences": 2186,
"score": 1,
"scr": 2186
}
],
"negKWAdjectives": [
{
"adjective": "horrible",
"occurences": 4137,
"avgScore": 1,
"prcnt": 15.232519
}
],
"competitors": [
{
"id": 159180,
"name": "Online Competitors",
"keywords": [
"experience"
],
"ct": 1176,
"avgScr": 1,
"keywordStats": [
{
"keyword": "problem",
"occurences": 2972,
"score": 1,
"scr": 2972
}
],
"negKWAdjectives": [
{
"adjective": "bad",
"occurences": 340,
"avgScore": 1,
"prcnt": 28.911564
}
]
}
]
}{
"code": 1161,
"message": "Invalid API key"
}{
"code": 1011,
"message": "Business id is invalid"
}{
"code": 89,
"message": "Rate limit exceeded"
}Headers
e.g. application/json
e.g. [Required] Partner specific API key provided by Birdeye for data exchange.
Media type of the JSON request body.
Path Parameters
Account Business Number.
Body
Type of source e.g. review [by default] or social.
Aggregation sources.
For all time : all.
Date from which data has to be fetched[MM/DD/YYYY].
Date until which data has to be fetched[MM/DD/YYYY].
List of competitors
Show child attributes
Show child attributes
Count of top Keywords to be fetched.
Count of top Adjectives to be fetched.
Order of the result e.g.: "occurrence"[default] or "ztoa" or "atoz"
-1 = negative sentiment,
Response
OK
Business Id
119468
Name of Enterprise
"Social Stress"
List of keywords.
Count.
27159
Average Score.
1
Show child attributes
Show child attributes
Negative keyword details
Show child attributes
Show child attributes
Competitor details
Show child attributes
Show child attributes