Skip to content
SynupAPI
Get an API key
GETapi.synup.com/api/v4/gbp-categories

Get GBP Categories

This API retrieves the Google Business Profile (GBP) categories available in a country. Use the siteCategoryId (GCID) of a category as primaryGbpSiteCategoryId or in additionalGbpSiteCategoryIds when you create or update a location in that country.

countryIso is required. Pass siteCategoryId as well to look up a single category, e.g. to check that a GCID is valid in that country before using it.

Requires an API key. Send it as Authorization: API <your-key> — see Getting started.

Parameters

Query

NameTypeRequiredDescription
countryIsostringrequiredRequired. ISO 3166-1 alpha-2 code of the country (case-insensitive), e.g. US. Returns the categories available for locations in this country.
siteCategoryIdstringoptionalOptional. A Google category ID (GCID), e.g. gcid:bakery. Returns only this category. Returns an error if it is not a GBP category in the given country.

Request

Request
curl -X GET 'https://api.synup.com/api/v4/gbp-categories?countryIso=&siteCategoryId=' \
  -H 'Authorization: API YOUR_API_KEY' \
  -H 'Content-Type: application/json'

Responses

StatusDescription
200Successfully retrieved GBP categories.
400Bad request. gbpCategories is null and errors[0].message says why: "countryIso is required." when countryIso is missing; "This country doesn't exist." when countryIso is not a known country; or "'gcid:not_a_category' is not a Google Business Profile category in US." when siteCategoryId is not a GBP category in that country.
401Unauthorized. Invalid or missing API key (errors[0].message is "SY90005:Invalid Token").
500Internal Server Error.
Example response
{
  "data": {
    "gbpCategories": {
      "totalResult": 2,
      "categories": [
        {
          "name": "Aadhaar center",
          "siteCategoryId": "gcid:aadhar_center"
        },
        {
          "name": "Bakery",
          "siteCategoryId": "gcid:bakery"
        }
      ]
    }
  }
}

Response body

NameTypeRequiredDescription
dataobjectrequired
data.gbpCategoriesobjectrequiredGBP categories in the country.
data.gbpCategories.totalResultintegerrequiredNumber of categories returned.
data.gbpCategories.categoriesarray of objectrequiredOne entry per Google category ID.
data.gbpCategories.categories[].namestringrequiredCategory name.
data.gbpCategories.categories[].siteCategoryIdstringrequiredGoogle category ID (GCID), e.g. gcid:bakery. Send this value as primaryGbpSiteCategoryId or in additionalGbpSiteCategoryIds.