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.

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 Who should read this book?

This might overlap with the “What will I learn?” section. It feels like a good thing to have up front to entice people to read or buy the book, though.

1.2 What will I learn?

Describe the overall goals, and explain the learning objective hierarchy. Maybe this is before or instead of who should read?

Maybe put the landscape here, and intro the structure of the book earlier. How will I learn? maybe?

1.3 What won’t I learn?

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

1.4 How is this book organized?

I’d love to know!

1.5 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.6 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.7 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.”↩︎