cURL
curl --request GET \
--url https://api.gmbapi.com/external-api/gmb/competitor-scan \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gmbapi.com/external-api/gmb/competitor-scan"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gmbapi.com/external-api/gmb/competitor-scan', 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.gmbapi.com/external-api/gmb/competitor-scan",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.gmbapi.com/external-api/gmb/competitor-scan"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.gmbapi.com/external-api/gmb/competitor-scan")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gmbapi.com/external-api/gmb/competitor-scan")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"payload": {
"id": "abc123-def4-5678-90ab-cdef12345678",
"placeId": "ChIJAaBcDdEfGhIJKlMnOpQrStUv",
"radius": 5000,
"text": "Coffee Shop",
"createdAt": 1700000000000,
"created_by": "user_abc123xyz",
"type": "general",
"account_id": "12345678901234567890",
"origin": "app.example.com",
"competitors": [
{
"rank": "1",
"name": "Example Coffee House",
"address": "123 Main Street, City, State 12345, Country",
"categories": [
"Coffee shop",
"Cafe"
],
"reviews": 450,
"avgRating": 4.8,
"placeId": "ChIJXyZwAbCdEfGhIjKlMnOpQr",
"website": "https://example-coffee.com",
"gac": true,
"lng": "-122.4194",
"lat": "37.7749",
"appearances": 95,
"top3appearances": 90,
"top5appearances": 95,
"top10appearances": 95
}
],
"center": {
"lat": 37.7749,
"lng": -122.4194
},
"client": {
"rank": 8,
"name": "My Coffee Business",
"address": "456 Oak Avenue, City, State 12345, Country",
"categories": [
"Coffee shop",
"Bakery"
],
"locationImages": [
"https://example.com/image1.jpg",
"https://example.com/image2.jpg"
],
"numberOfImages": 125,
"reviews": 180,
"avgRating": 4.5,
"placeId": "ChIJAaBcDdEfGhIJKlMnOpQrStUv",
"website": "https://my-coffee-business.com",
"description": "A cozy neighborhood coffee shop serving artisanal coffee and fresh pastries.",
"gac": false,
"lng": "-122.4200",
"lat": "37.7750",
"hasQA": true,
"appearances": 78,
"top3appearances": 5,
"top5appearances": 15,
"top10appearances": 35,
"hasPosts": true,
"postDate": "2024-01-15T10:30:00.000Z",
"profileUrl": "https://example.com/profile.jpg",
"dots": {
"dot1": 12,
"dot2": 8,
"dot3": 10,
"dot4": 15,
"dot5": 7
}
},
"strategy": {
"reviews_to_top1": 270,
"reviews_to_top3": 150,
"reviews_to_top5": 80,
"images_to_top1": 325,
"images_to_top3": 200,
"images_to_top5": 100,
"reviews_strategy": null
},
"dots": [
{
"rank": "8",
"lat": 37.775,
"lng": -122.42,
"ring": 1,
"dotId": "dot1"
},
{
"rank": "12",
"lat": 37.776,
"lng": -122.421,
"ring": 2,
"dotId": "dot2"
}
],
"number_of_competitors": 42,
"finishedAt": {
"_seconds": 1700000100,
"_nanoseconds": 500000000
},
"status": "completed"
}
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Competitor Scan
Get Scan Data
Returns the latest competitor scan for a location. Query with account_id plus scanId, location_id, or placeId.
GET
/
competitor-scan
cURL
curl --request GET \
--url https://api.gmbapi.com/external-api/gmb/competitor-scan \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gmbapi.com/external-api/gmb/competitor-scan"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gmbapi.com/external-api/gmb/competitor-scan', 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.gmbapi.com/external-api/gmb/competitor-scan",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.gmbapi.com/external-api/gmb/competitor-scan"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.gmbapi.com/external-api/gmb/competitor-scan")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gmbapi.com/external-api/gmb/competitor-scan")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"payload": {
"id": "abc123-def4-5678-90ab-cdef12345678",
"placeId": "ChIJAaBcDdEfGhIJKlMnOpQrStUv",
"radius": 5000,
"text": "Coffee Shop",
"createdAt": 1700000000000,
"created_by": "user_abc123xyz",
"type": "general",
"account_id": "12345678901234567890",
"origin": "app.example.com",
"competitors": [
{
"rank": "1",
"name": "Example Coffee House",
"address": "123 Main Street, City, State 12345, Country",
"categories": [
"Coffee shop",
"Cafe"
],
"reviews": 450,
"avgRating": 4.8,
"placeId": "ChIJXyZwAbCdEfGhIjKlMnOpQr",
"website": "https://example-coffee.com",
"gac": true,
"lng": "-122.4194",
"lat": "37.7749",
"appearances": 95,
"top3appearances": 90,
"top5appearances": 95,
"top10appearances": 95
}
],
"center": {
"lat": 37.7749,
"lng": -122.4194
},
"client": {
"rank": 8,
"name": "My Coffee Business",
"address": "456 Oak Avenue, City, State 12345, Country",
"categories": [
"Coffee shop",
"Bakery"
],
"locationImages": [
"https://example.com/image1.jpg",
"https://example.com/image2.jpg"
],
"numberOfImages": 125,
"reviews": 180,
"avgRating": 4.5,
"placeId": "ChIJAaBcDdEfGhIJKlMnOpQrStUv",
"website": "https://my-coffee-business.com",
"description": "A cozy neighborhood coffee shop serving artisanal coffee and fresh pastries.",
"gac": false,
"lng": "-122.4200",
"lat": "37.7750",
"hasQA": true,
"appearances": 78,
"top3appearances": 5,
"top5appearances": 15,
"top10appearances": 35,
"hasPosts": true,
"postDate": "2024-01-15T10:30:00.000Z",
"profileUrl": "https://example.com/profile.jpg",
"dots": {
"dot1": 12,
"dot2": 8,
"dot3": 10,
"dot4": 15,
"dot5": 7
}
},
"strategy": {
"reviews_to_top1": 270,
"reviews_to_top3": 150,
"reviews_to_top5": 80,
"images_to_top1": 325,
"images_to_top3": 200,
"images_to_top5": 100,
"reviews_strategy": null
},
"dots": [
{
"rank": "8",
"lat": 37.775,
"lng": -122.42,
"ring": 1,
"dotId": "dot1"
},
{
"rank": "12",
"lat": 37.776,
"lng": -122.421,
"ring": 2,
"dotId": "dot2"
}
],
"number_of_competitors": 42,
"finishedAt": {
"_seconds": 1700000100,
"_nanoseconds": 500000000
},
"status": "completed"
}
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Returns the latest competitor scan. Query with
account_id plus scanId, location_id, or placeId.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Unique identifier for the scan
Account ID associated with the scan (required)
Location ID associated with the scan
Google Place ID for the location