Å·±¦ÓéÀÖ

Jump to ratings and reviews
Rate this book

Build APIs You Won't Hate

Rate this book
Everyone and their dog wants an API, so you should probably learn how to build them.

Tasked with building an API for your company but don't have a clue where to start? Taken over an existing API and hate it? Built your own API and still hate it? This book is for you.

143 pages, ebook

First published November 25, 2013

52 people are currently reading
404 people want to read

About the author

Phil Sturgeon

3Ìýbooks12Ìýfollowers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
89 (24%)
4 stars
148 (41%)
3 stars
93 (25%)
2 stars
23 (6%)
1 star
7 (1%)
Displaying 1 - 30 of 42 reviews
Profile Image for Steven Wade.
1 review1 follower
December 10, 2015
I've read this book a few times. That's saying something. Technical books are boring and I typically use them to just scan and look at code bits, but not this book. The book not only explains best practices and lessons learned, but they're explained from the point of view of someone who earned the knowledge.

The author presents each point to the reader as someone having a conversation with a buddy at a bar over drinks. This tone helps to engage the reader, allows them to invest in the author, and allows the flow of conversation naturally instead of being academically structured.

No matter what language, what skill level you are currently at, if you're building, maintaining, or thinking about APIs, this book is for you.

Two thumbs up!

Profile Image for William Anderson.
134 reviews25 followers
December 6, 2015
Phil Sturgeon's writing is crude and offensive. His tone constantly talks down to the reader, belittles others makes assumptions on their behalf, is belittling and condescending. This books reads like something written by the standard patriarchal dude bros of tech, which tries to be funny but ends off being more upsetting than anything else. Just a couple of quotes from this book to illustrate the tone I am talking about.

"or the developer is a moron"
"shove this in your run() method"
"(duh)"
"Southerners have one or more teeth"

There is much to be learned in these pages about API's to be sure, but I would rather do the research myself or find another book than endure what is written on these pages in between the technical bits.
Profile Image for Christian Grobmeier.
AuthorÌý5 books3 followers
January 14, 2016
The book is quite an OK read. I would give it to younger developers or people who never worked with APIs before. For more experienced developers it has some inspiration here and there and sometimes can give you some valuable insight. Personally I found one or two things to think about. However, I could have survived without reading the book too with a little thinking myself.

The book could have been a bit shorter as it is now. Phil wrote it was edited and the style and grammar (from the view of a non-native speaker) is all well. However, some of the examples and explains are not "on topic". Also sometimes it's to deeply tied to PHP developers. A book on API design should not necessary explain how to use the Fractal PHP library. It should explain you need to take care on the data types, and that's it. At least, it does the latter, so I am happy.

In some cases I would have enjoyed a more deep dive in API design itself. So far it explained the concepts of REST very well and gave you some tools on hand to start. However this book doesn't help you that far you can build complex APIs. Maybe it was not meant that way, but I have understood it so it would help me to make great API I won't hate. Now I am able to avoid the most basic mistakes.

All in all it's not a bad book, but also one of which I expected a bit more. Again, beginners should give it a try, especially when they are working with PHP.

One final word, the humor used in this book is not for everybody. Sometimes it gave me a bad feeling, sometimes it was simply "too much" and repeating itself. Chuck Norris getting me? Phil getting me? Oh well...
Profile Image for Adi.
65 reviews
December 7, 2015
Concise and pragmatic. You might like Sturgeon's style or not, but this will get you and/or your team up to speed with building RESTful(ish) APIs. Nicely done.
Profile Image for Fernando Paladini.
AuthorÌý3 books13 followers
June 13, 2016
Um livro introdutório muito bom e relativamente divertido para um assunto bem importante.

O autor faz uma ótima introdução sobre APIs e passa pelos principais pontos que envolvem uma API: estruturação de recursos, REST, versionamento, segurança, tratamento de erros, entrada e saída de dados, etc. Mesmo para quem já é programador há algum tempo e já trabalhou (ou mesmo criou) algumas APIs, é um livro que pode acrescentar bastante. Tem bastante código-fonte disponível no Github do autor, o que auxilia a leitura dando exemplos reais de como APIs costumam se comportar.

As únicas críticas para este livro é que o autor poderia ter explicado com mais calma a sessão de autenticação com OAuth (para quem não conhece muito de OAuth não fica muito claro) e também quanto ao título do livro, que dá a impressão de que o livro vai falar sobre APIs de forma genérica, entretanto o livro foca completamente em APIs RESTful utilizando o protocolo HTTP/HTTPS.

Ademais, recomendado.
Profile Image for Giacomo Debidda.
29 reviews
April 11, 2020
I really enjoyed this technical book. It's reasonably short, easy to read, full of good advises and best practices, and it cites a lot of articles to study specific subjects in deep.

I found the book particularly useful regarding these topics:

- database seeding;
- API endpoints planning and creation;
- how to manage REST resources and subresources;
- relationships among REST resources;
- error reporting and application codes;
- authentication;
- API documentation;
- HATEOAS and hypermedia controls;
- API versioning.

While I think that the following topics could have been better:

- API testing;
- Pagination in a REST API.

Also, I didn't like too much the fact that some sections have code snippets written in PHP using the Laravel framework. Nevertheless, they are not hard to understand even if you don't know PHP.
Profile Image for Ravi Kumar.
3 reviews11 followers
December 27, 2015
Great writing!! with lots of humor specially that part bing (lol) and also I am not going to hate next API's project. Waiting for next release.

Profile Image for Htain Lin.
17 reviews15 followers
February 24, 2016
It may be good for people who start learning how should to do API. There is no so much information and real world problem between API and mobile client. Interesting chapter is last 3 chapter , Authentication , Pagination and API Version. This three chapter gave me the idea of how should I rethink about my API.
Profile Image for Li Jia Li.
38 reviews
May 24, 2015
Great book !!! Every web developer and API architect should read it.
Profile Image for Onur ÅŸahin.
78 reviews4 followers
July 2, 2023
I think this book has a lot of good advice and speaks to common sense. Some may criticize that it's too opinionated but I think things like design advice can't be purely objective and usually learned by experience.

I personally don't know PHP but I don't think it caused me any issue while reading this book. General web development experience is sufficient to understand most of this book.

For some points I disagree with the author. For example, in the pagination section, the author suggests using offset always, but this is simply not practical for large collections. Cursor pagination sometimes is just necessary to be able to perform deep pagination. The author didn't really talk about the practicality of offset pagination at all. Also I found the error handling section pretty thin. It could go much deeper.

In general I think this book is a good one that will improve your API design skills. But I think it doesn't provide enough additional resources in case the reader wants to read more in depth.
Profile Image for Héctor Iván Patricio Moreno.
407 reviews21 followers
September 3, 2017
This is a very educative book about almost everything you need to know about API's.
I really liked the humor he puts in his writing and also the approach to the topics: he stated the common ways people are doing things and explained the pros and cons of every approach, and finally explained why he use one or another.
I would like a more comprehensive book, Phil left out topics as how to upload images or other types of content through an API.
This book is essential if you are thinking about building an API, even though there is a new type of API's (GraphQL), this book will give you useful and actionable knowledge.
Profile Image for Andrzej.
220 reviews2 followers
May 1, 2018
A pretty good overview on how to build RESTful APIs, on the possible pitfalls and how to avid them. Even though the book is from 2015 (in APIs world this is quite some time ago ;) ) most of it's content is still very relevant. I found only the part on documentation a bit dated, as the best-practices actually went in a bit different direction. Also the code snippets are put in PHP, so not very relevant if you are not working in that environment. The book however can easily live without those examples and will prove useful for any API architect or designer.
Profile Image for Charlie Ehrbar.
3 reviews
April 21, 2025
This book has some really useful information on the development and maintenance of APIs. As someone who read this as an introduction I found it extremely helpful. However the information isn’t presented the best. Jokes are typically in bad taste and interrupt the authors flow, there are several that are funny though. There are tons of code snippets in php, had the author used pseudo code it would have been more informative. The last 3 or so chapters are by far the most well written and if the rest of the book had kept this tone and prose my rating would have been higher.
Profile Image for Anatolij Grigorjev.
33 reviews
December 31, 2024
An interesting compendium of opinionated information on how to design decent APIs
I felt that I am not the target audience for this book as it lacks deep technical insight and nuance, is much more suitable as an instructive volume for junior or fresh mid developers
The experience of the author is valid and useful, but if you have your own years of experience in API design or other product engineering this might be bit too low-brow
Profile Image for Dmytro Chasovskyi.
89 reviews
December 18, 2019
This is a decent reading for REST API development. It shortly covers all the main concepts such as versioning, authentication, testing, network and API debugging. The only reason why I rated it 4 out of 5 stars, it has some snippets with PHP and I rather expect them into an appendix, not in the main content.
Profile Image for Juhamatti.
6 reviews2 followers
August 22, 2017
Good coverage about the basics every web and backend developer should know about designing and implementing REST APIs.

Only downside was heavy use of PHP in the examples, but overall that won't bother too much.
Profile Image for Hong Son.
50 reviews3 followers
January 4, 2018
A good book with a lot of knowledge about building an API. And with a funny tone, Phil Sturgeon also shared a lot of his experience and personal thoughts.
The only thing that I think this book lacks is about JWT, a very common authentication technique for API recently.
92 reviews1 follower
June 24, 2023
Fantastic and succinct schooling on core API development concepts, with examples in multiple languages. This book has certainly provided me with some important points to consider in APIs I develop. Will save a lot of hassle of having to fix things that were not properly thought-out ahead of time.
Profile Image for Dmytro Chaban.
46 reviews2 followers
November 25, 2017
The same I can find by googling "REST API best practices". Not so much interesting. Also 75% of book about working with PHP that I don't like alot.
1 review
November 15, 2020
Has good advice, but can be three times shorter, I believe.
65 reviews6 followers
November 26, 2020
Somewhat ageing in some parts but overall still pretty relevant and learned a few interesting things.
22 reviews1 follower
March 14, 2017
Great overview of pluses and cons for different REST API implementations.

Example of different JSON response formats, API versioning, authentication and much more.
Profile Image for Sebastian Gebski.
1,150 reviews1,256 followers
May 1, 2016
REST only (sadly), opinionated, covers only basic technical aspects (development) & completely omits stuff like:
* design (different strategies & patterns)
* high availability in context of deployment (this actually makes more sense, as it's less tech-agnostic)
* when does RESTful approach fit & when it doesn't
* security aspects except of authentication

In general - if you want a primer for RESTful HTTP services, it's ok, but if you want something more, go & search somewhere else. One more thing - be warned, majority of examples are in PHP.
19 reviews1 follower
October 1, 2016
Sadly, this book did not meet my expectations. It is full of oversimplifications and assumptions. Initially I thought it might be appropriate for junior developers, but after getting through it I would not recommend it because of condescending style and lame attempts at humor. The only chapter I found to be decent was the last one about versioning. Most of the chapters in first part of the book need some editing work.
Profile Image for Mitchell Mckenna.
6 reviews33 followers
March 24, 2015
Definitely came in handy as I've been building out this current API. Phil does a good job of explaining various ways of implementing certain features and the pros/cons of each. I like that he's not afraid to admit "this is how I used to do it, and I'd ran into problems, so now I do it this way". Some sections could use a little more flushing out but I liked that it's not too long of a read.
Profile Image for Rukky.
15 reviews
February 24, 2020
Apart from the fact that he really needed to get an editor for all the typos in this book.... and the fact that the examples could be clearer, I think this is one of the most amazing tech books I've ever read. Reading it was like a breath of fresh air. You get all the information you need, no more and no less.
Displaying 1 - 30 of 42 reviews

Can't find what you're looking for?

Get help and learn more about the design.