Julia Evans jvns.ca

How to use undocumented web APIs  ↦

Julia Evans lays out her process for taking API responses in her browser’s dev tools and using them in her own programs/scripts:

  1. look in developer tools for a promising JSON response
  2. copy as cURL
  3. remove irrelevant headers
  4. translate it into Python

Some of you might be wondering – can you always do this?

The answer is sort of yes – browsers aren’t magic! All the information browsers send to your backend is just HTTP requests. So if I copy all of the HTTP headers that my browser is sending, I think there’s literally no way for the backend to tell that the request isn’t sent by my browser and is actually being sent by a random Python program.


Discussion

Sign in or Join to comment or subscribe

0:00 / 0:00