REST API Search endpoint

The search query requires the authorized connection to the search endpoint: https://api. Twitter .com/1.1/search/tweets.json

There are many data extraction functionalities of the endpoint, depending on the query format and additional parameters. For our case, we will build the following query:

premier league -filter:retweets AND -filter:replies 

Here:

  • premier league is a combination of two keywords,
  • -filter:retweets lets us get rid of all retweets in the extraction results
  • -filter:replies filters all replies to the tweet often unnecessary for the analysis

It is worth noticing that the query construction contains logical operator AND between two -filter statements.

Each endpoint has a set of additional parameters, ...

Get Python Social Media Analytics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.