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 over 3 years ago