The Ease of APIs

Wednesdays make me think of The New York Times.

My first* job out of college was working as a literary assistant at ICM, and an integral part of my job involved The New York Times bestseller list. It was released on Wednesdays, listing the books to be featured in the following Sunday’s Book Review. It was my job to look for our authors and send out a company email with all the books to make the list that week.

I found this to be incredibly nerve-wrecking. The process involved having everyone in the department send all of the authors they thought might make the list and then cross-referencing that with a printed out PDF. And people wanted to know who made it, now.

I left ICM almost four years ago — worked in media consulting and now am in a data science immersive program—today, I realized how much easier that task could have been.

The New York Times API is an incredibly easy and useful tool—after receiving an API key it only took three lines of python to access this week’s bestseller list and return it in a searchable, readable fashion.

Instead of reading through a PDF, I now have a nicely formatted list, with only the information I require.

This week’s Hardcover Fiction Top 5 Bestsellers:

1 THE GIRL ON THE TRAIN
Author: Paula Hawkins
Weeks on List: 5

2 ALL THE LIGHT WE CANNOT SEE
Author: Anthony Doerr
Weeks on List: 41

3 OBSESSION IN DEATH
Author: J D Robb
Weeks on List: 1

4 A SPOOL OF BLUE THREAD
Author: Anne Tyler
Weeks on List: 1

5 THE NIGHTINGALE
Author: Kristin Hannah
Weeks on List: 2

I’d say I wish I would have known this then, but I think that then, I would have been too intimidated at the idea of using an API. And that would have been incredibly foolish.

Tomorrow’s task? Find out who at ICM does this now and send them my trick!