Brandwatch Developer Hub

Welcome to the Brandwatch developer hub. You'll find comprehensive guides and API documentation to help you start working with Brandwatch as quickly as possible!

Get Started    

Locations

In order to filter by specific locations in a Query, Rule or when retrieving Mentions, you must make a call to a specific endpoint to search for the appropriate IDs.

Required Parameters

Parameter

Definition

Accepted Values

type

Defines what type of location you are searching for

city
region
country
continent

prefix

A search term of what the location begins with

String, i.e "usa"

The following call retrieves a list of locations which contain the prefix usa:

curl -X GET 'https://api.brandwatch.com/locations?type=region&prefix=usa'

And the response would look something like this, where the id is used when creating a Query, Rule or retrieving Mentions to either include or exclude this location.

{
    "resultsTotal": 51,
    "resultsPage": -1,
    "resultsPageSize": -1,
    "results": [
        {
            "id": "USA.OR",
            "name": "Oregon",
            "type": "region",
            "fullName": "Oregon, United States of America, North America",
            "qualifiedName": "Oregon, United States of America"
        },
        {
            "id": "USA.OH",
            "name": "Ohio",
            "type": "region",
            "fullName": "Ohio, United States of America, North America",
            "qualifiedName": "Ohio, United States of America"
        }
    ]
}

Updated 6 months ago

Locations


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.