Retrieving Categories

Listing the Categories within your Project.

The following call will list the Categories in the Project with ID 162752818:
(Click here to learn how to get your Project ID)

curl -X GET 'https://api.brandwatch.com/projects/162752818/rulecategories'

The response will look like this:

{
    "resultsTotal": 1,
    "resultsPage": -1,
    "resultsPageSize": -1,
    "results": [
        {
            "id": 14205369,
            "name": "Example Category 1",
            "displayName": null,
            "multiple": true,
            "queryIds": [123],
            "queries": [
                {
                    "id": 123,
                    "name": "queryName"
                }
            ],
            "children": [
                {
                    "id": 14205370,
                    "name": "Example Subcategory 1",
                    "ordering": 1,
                    "rules": []
                },
                {
                    "id": 14205371,
                    "name": "Example Subcategory 2",
                    "ordering": 2,
                    "rules": []
                }
            ],
            "matchingType": "manual"
        }
    ]
}

Here, the "Example Category 1" Category with ID 14205369 has two Subcategories, as identified in the children array.

You can then use these Category and Subcategory IDs when filtering or breaking down Mention calls. Elsewhere in the documentation you may see the top-level Categories being referred to as "Parent Categories".