Your API Is Bad cover page

Your API Is Bad

Your API Is Bad

(And You Should Feel Bad)

Your API Is Bad (And You Should Feel Bad) is a collection of API practices that are poorly considered and yet quite common. It's not a guide for how to write a good API, because that changes for every API. Instead, it's a bunch of suggestions for how to avoid writing a bad API.
Your API Is Bad Edit
This book is 70% complete


About the Book

Your API Is Bad (and You Should Feel Bad) is a collection of mistakes that people make in their APIs. With the ascendancy of APIs, this is really starting to hurt. This book is not designed to instruct you on writing a good API; only experience and well-reasoned thought about your specific API can do that. Instead, the book aims to steer you away from writing a bad API. It's a tour of poorly-considered decisions that exist in many popular APIs, the shortcomings of those decisions, and thoughts about better ways to do things.

The inspiration for this book came about as I was writing yet another client library for yet another service, and found (yet again) that the service returned no useful, machine-readable information in error messages. All the error messages told my code was "Your request was bad and you should feel bad."

This book is my response: "Your API is bad and you should feel bad."

Let's stop feeling bad about our APIs.

Read more

Table of Contents

  • 1 Acknowledgements
  • 2 Foreword
  • 3 Introduction
  • 4 Anatomy of an API
  • 5 URLs
  • 6 Requests and Responses
  • 7 Errors

Read More

About the Author

About the Contributors


Michael Mahemoff

Founder, Player FM

Michael graciously offered to write a foreword for this, lending his knowledge as a pioneer in the field of Developer Experience. A great developer experience starts with a great API, and Michael is an authority on both.

Read more

Causes Supported

Electronic Frontier Foundation

Defending your civil liberties in a digital world.

Based in San Francisco, EFF is a donor-supported membership organization working to protect fundamental rights regardless of technology.

From the Internet to the iPod, technologies are transforming our society and empowering us as speakers, citizens, creators, and consumers. When our freedoms in the networked world come under attack, the Electronic Frontier Foundation (EFF) is the first line of defense. EFF broke new ground when it was founded in 1990—well before the Internet was on most people's radar—and continues to confront cutting-edge issues defending free speech, privacy, innovation, and consumer rights today. From the beginning, EFF has championed the public interest in every critical battle affecting digital rights.

The Leanpub Unconditional, No Risk, 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks. We process the refunds manually, so they may take a few days to show up.
See full terms