Category and Tag Filtering

Filtering the Mentions within your Queries by Categories and Tags.

You can also Filter your Mentions by the Categories and Tags that are assigned to them. For your Project, you will need to first retrieve the Categories or Tags that you wish to filter by. You will use the associated Category or Tag IDs in the following parameters:

  • tag - Return Mentions that are tagged with this Tag ID.
  • xtag - Return Mentions that are not tagged with this Tag ID.
  • category - Return Mentions that are tagged with this Category ID.
  • xcategory - Return Mentions that are not tagged with this Category ID.

The Filters are passed as parameters to the Mentions data call. For example, to return Mentions that are tagged by Category ID 838322:

curl -X GET https://api.brandwatch.com/projects/289733322/data/mentions?queryId=1998640329&startDate=2016-05-01&endDate=2016-05-02&page=0&pageSize=1&category=838322

Here is one Mention that matches those Filters, out of total of 72:

{
  "resultsTotal": 72,
  "resultsPage": 0,
  "resultsPageSize": 1,
  "results": [
    {
      "accountType": null,
      "assignment": null,
      "author": "Najah Sameen",
      "authorCity": null,
      "authorCityCode": null,
      "authorContinent": "North America",
      "authorContinentCode": "n-a",
      "authorCountry": "United States",
      "authorCountryCode": "us",
      "authorCounty": null,
      "authorCountyCode": null,
      "authorLocation": "n-a,us,,,",
      "authorState": null,
      "authorStateCode": null,
      "avatarUrl": null,
      "averageDurationOfVisit": 0,
      "averageVisits": 0,
      "backlinks": 0,
      "blogComments": 0,
      "categories": [838322],
      "categoryDetails": [
        {
          "id": "838322",
          "name": "Lips",
          "parentId": "838321",
          "parentName": "Beauty products"
        }
      ],
      "checked": false,
      "city": null,
      "cityCode": null,
      "continent": "North America",
      "continentCode": "n-a",
      "country": "United States",
      "countryCode": "us",
      "county": null,
      "countyCode": null,
      "date": "2016-05-01T11:52:05.699+0000",
      "displayUrls": [],
      "domain": "www.indianbeautyforever.com",
      "engagement": 0,
      "expandedUrls": [],
      "facebookAuthorId": null,
      "facebookComments": 0,
      "facebookLikes": 0,
      "facebookRole": null,
      "facebookShares": 0,
      "facebookSubtype": null,
      "forumPosts": 0,
      "forumViews": 0,
      "fullname": null,
      "gender": "unknown",
      "id": 99581066231,
      "impact": 39,
      "importanceAmplification": 47,
      "importanceReach": 31,
      "impressions": 0,
      "influence": 0,
      "insightsHashtag": [],
      "insightsMentioned": [],
      "instagramCommentCount": 0,
      "instagramFollowerCount": 0,
      "instagramFollowingCount": 0,
      "instagramLikeCount": 0,
      "instagramPostCount": 0,
      "interest": [],
      "language": "en",
      "lastAssignmentDate": null,
      "latitude": 0,
      "locationName": null,
      "longitude": 0,
      "matchPositions": [
        {
          "start": 133,
          "text": "oil",
          "length": 3
        },
        {
          "start": 150,
          "text": "oil",
          "length": 3
        },
        {
          "start": 178,
          "text": "moisturizing",
          "length": 12
        },
        {
          "start": 201,
          "text": "lips",
          "length": 4
        },
        {
          "start": 217,
          "text": "use",
          "length": 3
        },
        {
          "start": 227,
          "text": "at",
          "length": 2
        },
        {
          "start": 230,
          "text": "night",
          "length": 5
        },
        {
          "start": 247,
          "text": "lips",
          "length": 4
        }
      ],
      "mediaUrls": [],
      "monthlyVisitors": 0,
      "mozRank": 0,
      "noteIds": [],
      "outreach": 0,
      "pageType": "news",
      "pagesPerVisit": 0,
      "percentFemaleVisitors": 0,
      "percentMaleVisitors": 0,
      "priority": null,
      "professions": [],
      "queryId": 1998640329,
      "queryName": "Makeup",
      "reach": 0,
      "replyTo": null,
      "resourceId": 99581066231,
      "resourceType": "page",
      "retweetOf": null,
      "sentiment": "positive",
      "shortUrls": [],
      "snippet": "Mango butter. These will hydrate and soften the dry lips. These lip balms also contain essential oils like macadamia nut oil, castor oil, carrot seed oil etc which are immensely moisturizing for flaky lips. I like to use these at night to give my lips boost of moisture. These lip moisturizer are mildly sweet in taste hence if you lick it you...",
      "starred": false,
      "state": null,
      "stateCode": null,
      "status": null,
      "subtype": null,
      "tags": [],
      "threadAuthor": null,
      "threadCreated": null,
      "threadEntryType": null,
      "threadId": "0",
      "threadURL": null,
      "title": "Island Kiss Tropical Lip Moisturisers Review - Indian Beauty Forever",
      "trackedLinkClicks": 0,
      "trackedLinks": null,
      "twitterAuthorId": null,
      "twitterFollowers": 0,
      "twitterFollowing": 0,
      "twitterPostCount": 0,
      "twitterReplyCount": 0,
      "twitterRetweets": 0,
      "twitterRole": null,
      "twitterVerified": false,
      "url": "http://www.indianbeautyforever.com/2016/04/island-kiss-tropical-lip-moisturisers-review.html?showComment=1462103525699",
      "wordCount": null
    }
  ],
  "maximumId": 99581066231,
  "maximumIdInResult": 99581066231,
  "startDate": "2016-05-01T00:00:00.000+0000",
  "endDate": "2016-05-02T00:00:00.000+0000"
}

Category and Tag Filtering

Filtering the Mentions within your Queries by Categories and Tags.