1  Introduction

The modern internet is full of web APIs1: services that enable communication between computer programs. Whether or not you realize it, you likely use web APIs every day, when you

It’s equally likely that you could be using web APIs to help you with more things. You could automatically update a dashboard with information from your work issue tracker, or enrich datasets by adding additional context for places or dates. You could connect your favorite recipe site to your calendar and grocery list for weekly meal planning, or add tasks to your to-do list from your R console while you work. You could automate the things you do all the time, and find new things you didn’t know were possible.

The goal of Web APIs with R is to teach you how to unlock the power of APIs in your R code.

1.1 What will I learn?

Somewhere in here: Include the overall landscape of web-related packages: rvest, httr(2), plumber, but also RSelenium, chromote, curl, touch on some api-specific packages.

1.1.1 Who should read this book?

1.1.2 What does each chapter cover?

1.1.3 What won’t I learn?

I like the idea of this section, but I don’t know if it will fit.

1.1.4 What should I already know?

Describe what we expect people to already know. Include references to other books: R4DS, AdvR, RPkgs, Do4DS, maybe MShiny. Note that each part and/or chapter will describe the prerequisites for that part. Most of those books will be places to find more info or to dive deeper into a topic.

1.2 How will I learn?

Introduce the concept of LOs, and why this book is structured around them. Note that normally they’ll be at the beginning of the chapter

1.2.1 Learning Objectives

After you read this chapter, you will be able to:

  • Explain what an API is.
  • Decide whether this book is for you.

1.2.2 How do I run the code?

Explain what code looks like here vs to the user. Give a disclaimer that open source software changes so things might change, and that we’ll try to keep the online version up-to-date. Potentially link to additional resources, maybe a book package.

1.3 Acknowledgements

This is the acknowledgement that appears in the actual book. RStudio has code to auto-generate it, consider something similar.


  1. API stands for “application programming interface,” but you will almost always see it written as “API.” It’s pronounced “A P I.”↩︎