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

Overview

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 the new 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 how to decide what Twitter API endpoints to use, 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

Owner
@TwitterDev
Code samples from Twitter Developer Relations for common use cases including REST API and Tweet display
@TwitterDev
Quack-SMS-BOMBER - Quack Toolkit By IkigaiHack

Quack Toolkit By IkigaiHack About Quack Toolkit Quack Toolkit is a set of tools

Marcel 2 Aug 19, 2022
Tools for Twitter

Tools for Twitter Data This is a start of a collection of tools to use for collecting data via the Twitter API. If you do not have a Twitter Developer

DiscoverText 36 Oct 13, 2022
This is a tool to help people to make a bot for labelling images for machine learning projects.

labeller_images_python_telegramBOT This is a bot to help collect data for any machine learning project. It was developed using the python-telegram-bot

Diego Silveira 2 Nov 13, 2021
A Telegram Calculator to calculate your maths sums

CalculatorBot A Telegram Calculator to calculate your maths sums! Made by /Team

TeamOctave 2 Dec 31, 2021
Archive tweets and make them searchable

Tweeter Archive and search your tweets and liked tweets using AWS Lambda, DynamoDB and Elasticsearch. Note: this project is primarily being used a tes

Kamil Sindi 8 Nov 18, 2022
Huan Xu 1.6k Jan 04, 2023
Binance Futures Client

Binance Futures Client

4 Aug 02, 2022
This code is for a bot which will find a Twitter user's most tweeted word and tweet that word, tagging said user

max_tweeted_word This code is for a bot which will find a Twitter user's most tweeted word and tweet that word, tagging said user The program uses twe

Yasho Bapat 1 Nov 29, 2021
Surfline Forecast Bot For Python

Surfline Forecast Bot A telegram bot created using Telethon that allows users to

1 May 08, 2022
Wrapper for Between - 비트윈을 위한 파이썬 라이브러리

PyBetween Wrapper for Between - 비트윈을 위한 파이썬 라이브러리 Legal Disclaimer 오직 교육적 목적으로만 사용할수 있으며, 비트윈은 VCNC의 자산입니다. 악의적 공격에 이용할시 처벌 받을수 있습니다. 사용에 따른 책임은 사용자가

1 Mar 15, 2022
A Really Simple and Advanced Google Colab NoteBook to Setup and start using Rclone on Google Colab easily.

Rclone on Google Colab (Advanced!) 🔥 1.Setup and Start using Rclone on Google Colab and Create/Edit/View and delete your Rclone config file and keep

Dr.Caduceus 14 May 24, 2022
Скрипт, позволяющий импортировать плейлисты из Spotify, а также обычные треклисты в VK музыку.

vk-music-import Программа для переноса плейлистов из Spotify и текстовых треклистов в VK Музыку. Преимущества: Позволяет быстро импортировать плейлист

Mew Forest 32 Nov 23, 2022
A python script that changes our background based on current weather and time of the day.

Desktop background on Windows 10, based on current weather and time A python script that changes our background based on current weather and time of t

Maj Gaberšček 1 Nov 16, 2021
Get informed when your DeFI Earn CRO Validator is jailed or changes the commission rate.

CRO-DeFi-Warner Intro CRO-DeFi-Warner can be used to notify you when a validator changes the commission rate or gets jailed. It can also notify you wh

5 May 16, 2022
Telegram PHub Bot using ARQ Api and Pyrogram. This Bot can Download and Send PHub HQ videos in Telegram using ARQ API.

Tg_PHub_Bot Telegram PHub Bot using ARQ Api and Pyrogram. This Bot can Download and Send PHub HQ videos in Telegram using ARQ API. OS Support All linu

TheProgrammerCat 13 Oct 21, 2022
A python wrapper for the mangadex API V5. Work in progress

mangadex A python wrapper for the mangadex API V5. It uses the requests library and all the aditional arguments can be viewed in the Official Mangadex

Eduardo Ceja 27 Dec 14, 2022
LavaAPI - A simple library for accepting payments and using the LAVA Wallet

This library was created to simplify the LAVA api provided on the official websi

Vlad Baccara 8 Dec 18, 2022
A Python script that wraps the gitleaks tool to enable scanning of multiple repositories in parallel

mpgitleaks A Python script that wraps the gitleaks tool to enable scanning of multiple repositories in parallel. The motivation behind writing this sc

Emilio Reyes 7 Dec 29, 2022
API to retrieve the number of grades on the OGE website (Website listing the grades of students) to know if a new grade is available. If a new grade has been entered, the program sends a notification e-mail with the subject.

OGE-ESIREM-API Introduction API to retrieve the number of grades on the OGE website (Website listing the grades of students) to know if a new grade is

Benjamin Milhet 5 Apr 27, 2022
Модуль для создания скриптов для ВКонтакте | vk.com API wrapper

vk_api vk_api – Python модуль для создания скриптов для ВКонтакте (vk.com API wrapper) Документация Примеры Чат в Telegram Документация по методам API

Kirill 1.2k Jan 04, 2023