Basic Mentions Filtering

Filtering the Mentions within your Queries.

Now you have seen the Filters that can be applied to Mentions, let's apply two of them. We want to restrict the data that is returned to be only tweets with neutral sentiment. We use two Filters for this:

  • pageType - In our particular case, we are interested in twitter.
  • sentiment - We want neutral Mentions to be returned.

The Filters are passed as parameters to the Mentions data call:

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&pageType=twitter&sentiment=neutral

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

{
  "resultsTotal": 57,
  "resultsPage": 0,
  "resultsPageSize": 1,
  "results": [
    {
      "accountType": "individual",
      "assignment": null,
      "author": "SomeKindaBoogin",
      "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": "https://pbs.twimg.com/profile_images/558408263138418689/eKfX9JGi_normal.jpeg",
      "averageDurationOfVisit": 20,
      "averageVisits": 6,
      "backlinks": 49850734,
      "blogComments": 0,
      "categories": [],
      "categoryDetails": [],
      "checked": false,
      "city": null,
      "cityCode": null,
      "continent": "North America",
      "continentCode": "n-a",
      "country": "United States",
      "countryCode": "us",
      "county": null,
      "countyCode": null,
      "date": "2016-05-01T23:37:07.000+0000",
      "displayUrls": [
        "twitter.com/ricky_vaughn99…"
      ],
      "domain": "twitter.com",
      "engagement": 0,
      "expandedUrls": [
        "https://twitter.com/ricky_vaughn99/status/726850523555631104"
      ],
      "facebookAuthorId": null,
      "facebookComments": 0,
      "facebookLikes": 0,
      "facebookRole": null,
      "facebookShares": 0,
      "facebookSubtype": null,
      "forumPosts": 0,
      "forumViews": 0,
      "fullname": "Todd Sweeney",
      "gender": "male",
      "id": 98610951311,
      "impact": 45,
      "importanceAmplification": 30,
      "importanceReach": 60,
      "impressions": 3026,
      "influence": 661,
      "insightsHashtag": [],
      "insightsMentioned": [
        "@dissidentusa"
      ],
      "instagramCommentCount": 0,
      "instagramFollowerCount": 0,
      "instagramFollowingCount": 0,
      "instagramLikeCount": 0,
      "instagramPostCount": 0,
      "interest": [
        "Books",
        "Family & Parenting"
      ],
      "language": "en",
      "lastAssignmentDate": null,
      "latitude": 0,
      "locationName": null,
      "longitude": 0,
      "matchPositions": [],
      "mediaUrls": [],
      "monthlyVisitors": 6000000000,
      "mozRank": 9.6,
      "noteIds": [],
      "outreach": 0,
      "pageType": "twitter",
      "pagesPerVisit": 22,
      "percentFemaleVisitors": 46,
      "percentMaleVisitors": 54,
      "priority": null,
      "professions": [
        {
          "profession": "Software developer & IT",
          "jobTitle": "Programmer"
        },
        {
          "profession": "Teacher & Lecturer",
          "jobTitle": "Teacher"
        }
      ],
      "queryId": 289733322,
      "queryName": "Trump",
      "reach": 661,
      "replyTo": null,
      "resourceId": 98610951311,
      "resourceType": "page",
      "retweetOf": "http://twitter.com/dissidentusa/statuses/726916506186092544",
      "sentiment": "neutral",
      "shortUrls": [
        "https://t.co/0kOd9bVFDY"
      ],
      "snippet": "RT @dissidentusa: I'm expecting Trump to inherit a major economic crisis, which the media will blame him for. They are angry. twitter.com/ricky_vaughn99…",
      "starred": false,
      "state": null,
      "stateCode": null,
      "status": null,
      "subtype": null,
      "tags": [],
      "threadAuthor": "dissidentusa",
      "threadCreated": null,
      "threadEntryType": "share",
      "threadId": "0",
      "threadURL": null,
      "title": "Todd Sweeney (@SomeKindaBoogin): RT @dissidentusa: I'm expe ...",
      "trackedLinkClicks": 0,
      "trackedLinks": null,
      "twitterAuthorId": "2791121294",
      "twitterFollowers": 3026,
      "twitterFollowing": 1409,
      "twitterPostCount": 101055,
      "twitterReplyCount": 0,
      "twitterRetweets": 0,
      "twitterRole": null,
      "twitterVerified": false,
      "url": "http://twitter.com/SomeKindaBoogin/statuses/726918403311677440",
      "wordCount": null
    }
  ],
  "maximumId": 98610951311,
  "maximumIdInResult": 98610951311,
  "startDate": "2016-05-01T00:00:00.000+0000",
  "endDate": "2016-05-02T00:00:00.000+0000"
}

Basic Mentions Filtering

Filtering the Mentions within your Queries.