How can I query new mentions for one or multiple keywords(s)?

To get mentions for one or multiple keywords, you have to get the ID(s) of the keyword(s) first.

If you have the keyword(s’) ID(s), you can get the mentions via the https://data.neticle.com/24.04/mentions endpoint described in the documentation: https://data.neticle.com/docs/24.04#mentions:listing-mentions.

Before making your first query, it is essential to familiarize yourself with the Authentication section. This will guide you on how to generate a valid API key, which is necessary for accessing the data. For detailed instructions, please visit: https://neticle.com/knowledge-base/how-can-i-authenticate-my-queries-in-data-api

A filter object (https://data.neticle.com/docs/22.09#mentions:listing-mentions-request-viewfilter) has to be sent in each query with some omittable and some required fields:

  • Required:
    • At least one keyword or aspect ID in an array
  • Omittable:
    • Interval filter
      • (if not set, the default is the last 7 days)
    • Source filter 
      • (if not set, mentions from all sources will be presented)
    • Gender filter
      • (if not set, mentions will not be filtered based on the gender of the author)
    • Polarity filter
      • (if not set, positive, negative and neutral mentions will be presented)

This filter object needs to be converted to a URL encoded string and sent in the query.


For example, to get mentions for the default last 7 days for a keyword with an ID of 10001:

https://data.neticle.com/24.04/mentions?filters[keywords][0]=10001


To get mentions for both keywords 10001 and 10002:

https://data.neticle.com/24.04/mentions?filters[keywords][0]=10001&filters[keywords][1]=10002


If you need other than the last 7 days, you can use the interval filter: (https://data.neticle.com/docs/24.04#mentions:listing-mentions-request-intervalfilter).

A “start” and an “end” timestamp needs to be set in the query in UNIX time format. You have to create these timestamps programmatically before each query to have the proper interval, but you can use for example https://www.epochconverter.com/ to generate timestamps manually. The timestamps needs to be sent in milliseconds:

&filters[interval][start]=1687940627000&filters[interval][end]=1688027026000

Based on this, a full query for 2 keywords with IDs of 10001 and 10002 should look like:

https://data.neticle.com/24.04/mentions?filters[keywords][0]=10001&filters[keywords][1]=10002&filters[interval][start]=1687940627000&filters[interval][end]=1688027026000

 

With an included sample Authorization header in cURL format:

curl -G https://data.neticle.com/24.04/mentions \

-H 'X-Requested-With: XMLHttpRequest' \ 

-H 'Authorization: Basic RXhhbXBsZUFwaUtleV9fbG5SRVFJST' \ 

-d 'filters[keywords][0]=10001'\ 

-d 'filters[keywords][1]=10002'\

-d ‘filters[interval][start]=1687940627000’\

-d ‘filters[interval][start]=1688027026000’