Retrieving Queries
Listing the Queries that contain your data.
You can either retrieve all Queries in a given Project, or filter by Query type.
Retrieving all Queries in a Project
The following call will list the Queries in the Project with ID 398748937
:
(Click here to learn how to get your Project ID)
curl -X GET https://api.brandwatch.com/projects/398748937/queries/summary
The response will look like the following:
{
"resultsTotal": 2,
"resultsPage": -1,
"resultsPageSize": -1,
"results": [
{
"id": 1999933037,
"name": "@brandwatchsocial",
"type": "monitor",
"creationDate": "2019-10-10T17:36:13.933+0000",
"lastModificationDate": "2019-10-10T17:37:23.681+0000",
"lastModifiedUsername": "[email protected]",
"lockedQuery": false,
"lockedByUsername": null,
"languages": [
"en"
],
"contentSources": [
"news",
"twitter",
"review",
"blog"
],
"languageAgnostic": false
},
{
"id": 1999934807,
"name": "Mentions of Pepsi",
"type": "monitor",
"creationDate": "2019-10-14T13:58:21.525+0000",
"lastModificationDate": "2019-10-23T17:22:15.904+0000",
"lastModifiedUsername": "[email protected]",
"lockedQuery": false,
"lockedByUsername": null,
"languages": [
"en"
],
"contentSources": [
"news"
],
"languageAgnostic": false
}
]
}
You can then use the id
of the Query to apply a Filter to Mentions data calls, or to create charts with.
For more detailed information on your Queries, including the contents of the query, then you can call the following endpoint.
curl -X GET https://api.brandwatch.com/projects/398748937/queries
The response will look like the following:
{
"resultsTotal": 1,
"resultsPage": -1,
"resultsPageSize": -1,
"results": [
{
"id": 1999933037,
"name": "BBC",
"description": null,
"creationDate": "2019-10-10T17:36:13.933+0000",
"lastModificationDate": "2019-10-10T17:37:23.681+0000",
"languages": [
"en"
],
"type": "monitor",
"highlightTerms": [
"the BBC",
],
"lastModifiedUsername": "[email protected]",
"lockedQuery": false,
"lockedByUsername": null,
"lockedTime": null,
"booleanQuery": "the BBC",
"startDate": "2016-01-01T00:00:00.000+0000",
"percentComplete": 100,
"samplePercentage": 11.4649,
"sampled": false,
"locationFilter": null,
"imageFilter": null,
"contentSources": [
"news",
"twitter",
"review",
"blog"
],
}
]
}
Retrieving Queries Filtered by Type
You can determine whether a Query is a standard Brandwatch Query or a Channel by the type
field:
monitor
- A Brandwatch query created by the Query Wizard, or by Boolean search string.twitter
- A Twitter Channel.publicfacebook
- A Facebook Channel.instagram
- An Instagram Channel.
If you wish to only retrieve a particular type of Query, then you can pass the type
as a parameter.
The following call will list the Instagram Channels in the Project with ID 398748937
:
(Click here to learn how to get your Project ID)
curl -X GET https://api.brandwatch.com/projects/398748937/queries?type=instagram
Updated 14 days ago