Get Theme Statistics
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": [
"<unknown>"
],
"occr": 3,
"avgScore": 1,
"pPrct": 123,
"nPrct": 0.04717,
"prct": 0.006304,
"pCt": 30707,
"nCt": 6360,
"ct": 47592,
"themeStats": [
"<unknown>"
],
"competitors": [
"<unknown>"
]
}{
"code": 1167,
"message": "API key is missing"
}{
"code": 1011,
"message": "Business id is invalid"
}{
"code": 89,
"message": "Rate limit exceeded"
}Competitor AI
Competitive Insight Themes
POST
/
v1
/
competitors
/
competitive-insight
/
themes
/
{businessNumber}
Get Theme Statistics
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": [
"<unknown>"
],
"occr": 3,
"avgScore": 1,
"pPrct": 123,
"nPrct": 0.04717,
"prct": 0.006304,
"pCt": 30707,
"nCt": 6360,
"ct": 47592,
"themeStats": [
"<unknown>"
],
"competitors": [
"<unknown>"
]
}{
"code": 1167,
"message": "API key is missing"
}{
"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.
Path Parameters
Account Business Number.
Body
application/json
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
Count of top Themes to be fetched.
Order of the result e.g.: "occurrence"[default] or "ztoa" or "atoz"
-1 = negative sentiment,
1 = positive sentiment,
0 = all sentiments [default].
Response
OK
Business Id.
Example:
398331
Name of Enterprise.
Example:
"Social Stress"
List of Themes.
Occurence.
Example:
3
Average Score.
Example:
1
Positive Percentage.
Negative Percentage.
Example:
0.04717
Percentage
Example:
0.006304
Positive Count.
Example:
30707
Negative Count.
Example:
6360
Total Count.
Example:
47592
List of Theme details
Competitor details.

