4.15 X-Twitter’s APIs

  1. REST API:
    • Queries for specific information about users and tweets
    • Search recent tweets
    • Examples: user profile, list of followers and friends, tweets generated by a given user (“timeline”), users lists, etc.
    • R library: tweetscores (also twitteR, rtweet)
  2. Streaming API:
    • Connect to the “stream” of tweets as they are being published
    • Three streaming APIs:
      • Filter stream: tweets filtered by keywords
      • Geo stream: tweets filtered by location
      • Sample stream: 1% random sample of tweets
  • R library: streamR
  • Important limitation: tweets can only be downloaded in real time (exception: user timelines, 3,200 most recent tweets are available)