Week 3) Foundations of APIs

Learning goals

By the end of this week, you should understand:

  • what APIs are and how they differ from ordinary websites;
  • how APIs provide structured access to data;
  • why APIs have rules and technical limits that researchers need to consider; and
  • how APIs can be used to collect, enrich, or transform research data.

Preparation before class

  • Review the relevant sections of the Python Bootcamp and Web Scraping 101.
  • Make sure that you can access JupyterLab at jupyterlab.uvt.nl.

Tutorials

APIs 101

This tutorial introduces API requests, parameters, JSON responses, pagination, and storing API results.

APIs Advanced

This tutorial uses an AI API to introduce authenticated requests, prompt-based data enrichment, additional endpoints, and embeddings.

API access may require a separate key or account. Follow the course instructions and never share API keys or commit them to a repository.

After class

  • Work through APIs 101 and APIs Advanced.
  • Compare the strengths and limitations of scraping and APIs for your team project.
  • Continue developing your project data-collection plan.