Giter Site home page Giter Site logo

twitterdev / getting-started-with-the-twitter-api-v2-for-academic-research Goto Github PK

View Code? Open in Web Editor NEW
554.0 34.0 138.0 1.7 MB

A course on getting started with the Twitter API v2 for academic research

License: Apache License 2.0

Python 94.62% R 5.38%
twitter-api-v2 twitter-data

getting-started-with-the-twitter-api-v2-for-academic-research's Introduction

Getting started with the Twitter API v2 for academic research

banner

Welcome to this '101 course' on getting started with academic research using the Twitter API. The objective of this course is to help academic researchers learn how to get Twitter data using Twitter API v2.

By the end of this course, you will learn:

  • What the Twitter API is
  • How to apply for the Academic Research product track and what’s available in it
  • How to identify the endpoints to use for your use-case
  • How to get data from the Twitter API v2 using Python and R
  • How to write and build search queries

Who is this course for?

This is an introductory course (101), meant for anyone who is interested in getting started with the Twitter API v2 for research including

  • Academic Researchers
  • Students
  • Independent Researchers

Note: While undergraduate students & independent researchers do not qualify for the academic research product track (which provides ability to search for Tweets older than 7 days), they can still follow this course and use the standard product track and the code samples associated with it.

For most of this course, there are no prerequisites and anyone can follow along. Specifically for module 6 which is the labs, you need to know very basic coding in Python or R. If you want to first learn or review the syntax for these two languages, check out the appendix section. It provides links to introductory material on Python and R, along with instructions on how to install Python and R.

Who is this course not for?

This is designed like a 100-level course. If you already gained access to the Academic Research product track, and/or, you already know how to get data from the Twitter API v2 using Python or R, this course may feel too “introductory” for you.

How is this course structured

This course consists of 8 modules. Use this course as a complete start-to-finish lesson for getting started, or if you already know some of the basics, you can start off on one of the more advanced modules later on in the course.

  • Module 1: Learn what the Twitter API v2 is, and see examples of research done with it
  • Module 2: Learn how to apply for a Twitter developer account and how to choose the right product track for your project
  • Module 3: Learn what resources to request through the Twitter API, based on the data you need
  • Module 4: Learn how to get your keys and bearer token from the developer dashboard to start using the Twitter API
  • Module 5: Learn how to write search queries to get Tweets from the Twitter API
  • Module 6 Labs in Python and R to learn how to write code and use libraries and packages to get Twitter data
  • Module 7: Learn how to store Twitter data once you receive it, as well as data compliance and best practices
  • Module 8: See a summary of what we learned in this course and find links for important resources for future reference.

There is also an Appendix that contains additional information and a glossary of terms used throughout this course, so it is a good idea to keep it handy (maybe even open in a new tab) and reference it whenever you come across a new term in this course.

Assumptions

Tweets

Whenever we refer to getting ‘Tweets’ using the Twitter API, we refer to only those Tweets that are publicly available. The Twitter API does not provide Tweet information for Tweets that have been deleted, and does not provide Tweets from users who have made their Tweets private.

V2 Only

We will only be using the new Twitter API v2 and not the old API (v1.1). To learn more about the Twitter API v2, check out this technical overview of the Twitter API v2.

Let us start with module 1, that provides an introduction to Twitter API and examples of research with it.

Get Started

getting-started-with-the-twitter-api-v2-for-academic-research's People

Contributors

andypiper avatar dgarcia-eu avatar l3str4nge avatar moingshaikh avatar pitmonticone avatar sparack avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

getting-started-with-the-twitter-api-v2-for-academic-research's Issues

twarc command line examples?

This isn't a bug as much as an observation. First, I should say thank you for the examples using twarc in this documentation! As one of the maintainers of the module it's really nice to see it getting used and promoted by Twitter.

One of the things that twarc tries to do is provide users with a reliable command line tool for collecting Twitter data so that they can use whatever language or tools they want to do their analysis. I was wondering if it might make sense to also provide command line versions of the operations you have here? People can do many of the things you describe here with twarc without writing any code at all. Would a PR along these lines be helpful to see what it would look like?

I can't read the Jsonl file with my twitter data

One line summary of the issue here.

Expected behavior

As concisely as possible, describe the expected behavior.

Actual behavior

As concisely as possible, describe the observed behavior.

Steps to reproduce the behavior

Please list all relevant steps to reproduce the observed behavior.

Tweets and retweets only

Is there a combination to extract only the tweets and retweets of an account?

In this way the mentions are also obtained:
twarc2 search @barripdmx --archive test.jsonl

Best regards
barri

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.