curl --request POST \
--url https://api.birdeye.com/resources/v1/competitors/competitive-insight/themes/{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
]
}
],
"topThm": 25,
"orderBy": "occurrence",
"sentiment": -1
}
'import requests
url = "https://api.birdeye.com/resources/v1/competitors/competitive-insight/themes/{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]
}
],
"topThm": 25,
"orderBy": "occurrence",
"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]}
],
topThm: 25,
orderBy: 'occurrence',
sentiment: -1
})
};
fetch('https://api.birdeye.com/resources/v1/competitors/competitive-insight/themes/{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/themes/{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
]
]
],
'topThm' => 25,
'orderBy' => 'occurrence',
'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/themes/{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 \"topThm\": 25,\n \"orderBy\": \"occurrence\",\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/themes/{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 \"topThm\": 25,\n \"orderBy\": \"occurrence\",\n \"sentiment\": -1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.birdeye.com/resources/v1/competitors/competitive-insight/themes/{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 \"topThm\": 25,\n \"orderBy\": \"occurrence\",\n \"sentiment\": -1\n}"
response = http.request(request)
puts response.read_body{
"id": 398331,
"name": "Social Stress",
"themes": [
"your money"
],
"occr": 3,
"avgScore": 1,
"pPrct": 0,
"nPrct": 0.047169812,
"prct": 0.0063035805,
"pCt": 30707,
"nCt": 6360,
"ct": 47592,
"themeStats": [
{
"theme": "your money",
"adj": "your",
"kw": "money",
"pCt": 0,
"nCt": 3,
"ct": 3,
"score": 3,
"scr": 1
},
{
"theme": "wrong vehicle",
"adj": "wrong",
"kw": "vehicle",
"pCt": 4,
"nCt": 4,
"ct": 14,
"score": 4,
"scr": 1
}
],
"competitors": [
{
"id": 530846,
"name": "Social 1",
"themes": [
"your money"
],
"occr": 0,
"avgScore": 0,
"pPrct": 0,
"nPrct": 0,
"prct": 0,
"pCt": 41,
"nCt": 67,
"ct": 132,
"themeStats": [
{
"theme": "young lady",
"adj": "young",
"kw": "lady",
"pCt": 0,
"nCt": 1,
"ct": 2,
"score": 1,
"scr": 1
}
]
}
]
}{
"code": 1161,
"message": "Invalid API key"
}{
"code": 1011,
"message": "Business id is invalid"
}{
"code": 89,
"message": "Rate limit exceeded"
}Competitive Insight Themes
Get Theme Statistics retrieves Insights topic details for a competitor.
curl --request POST \
--url https://api.birdeye.com/resources/v1/competitors/competitive-insight/themes/{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
]
}
],
"topThm": 25,
"orderBy": "occurrence",
"sentiment": -1
}
'import requests
url = "https://api.birdeye.com/resources/v1/competitors/competitive-insight/themes/{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]
}
],
"topThm": 25,
"orderBy": "occurrence",
"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]}
],
topThm: 25,
orderBy: 'occurrence',
sentiment: -1
})
};
fetch('https://api.birdeye.com/resources/v1/competitors/competitive-insight/themes/{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/themes/{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
]
]
],
'topThm' => 25,
'orderBy' => 'occurrence',
'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/themes/{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 \"topThm\": 25,\n \"orderBy\": \"occurrence\",\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/themes/{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 \"topThm\": 25,\n \"orderBy\": \"occurrence\",\n \"sentiment\": -1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.birdeye.com/resources/v1/competitors/competitive-insight/themes/{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 \"topThm\": 25,\n \"orderBy\": \"occurrence\",\n \"sentiment\": -1\n}"
response = http.request(request)
puts response.read_body{
"id": 398331,
"name": "Social Stress",
"themes": [
"your money"
],
"occr": 3,
"avgScore": 1,
"pPrct": 0,
"nPrct": 0.047169812,
"prct": 0.0063035805,
"pCt": 30707,
"nCt": 6360,
"ct": 47592,
"themeStats": [
{
"theme": "your money",
"adj": "your",
"kw": "money",
"pCt": 0,
"nCt": 3,
"ct": 3,
"score": 3,
"scr": 1
},
{
"theme": "wrong vehicle",
"adj": "wrong",
"kw": "vehicle",
"pCt": 4,
"nCt": 4,
"ct": 14,
"score": 4,
"scr": 1
}
],
"competitors": [
{
"id": 530846,
"name": "Social 1",
"themes": [
"your money"
],
"occr": 0,
"avgScore": 0,
"pPrct": 0,
"nPrct": 0,
"prct": 0,
"pCt": 41,
"nCt": 67,
"ct": 132,
"themeStats": [
{
"theme": "young lady",
"adj": "young",
"kw": "lady",
"pCt": 0,
"nCt": 1,
"ct": 2,
"score": 1,
"scr": 1
}
]
}
]
}{
"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 Themes to be fetched.
Order of the result e.g.: "occurrence"[default] or "ztoa" or "atoz"
-1 = negative sentiment,
Response
OK
Business Id.
398331
Name of Enterprise.
"Social Stress"
List of Themes.
Occurence.
3
Average Score.
1
Positive Percentage.
Negative Percentage.
0.04717
Percentage
0.006304
Positive Count.
30707
Negative Count.
6360
Total Count.
47592
List of Theme details
Show child attributes
Show child attributes
Competitor details.
Show child attributes
Show child attributes