Patentsview Swagger UI

Swagger UI is an incredibly helpful tool that can be used to learn the ins and outs of an API. The whole thing is an opensource project (swagger.io) that is easy to install. All an API provider needs to do is write a json object specifying what the heck the API does. The json object encapsulates what endpoints the API has, what inputs it accepts, what outputs it produces and in what format(s), and what errors could be returned etc. Once installed anyone can use the "Try it out!" button to send in requests. It's great fun to see exactly what is returned, whether it's an error or data. You can read all the documentation an API provider supplies but there is no substitute for playing around and actually interacting with the API without having to write your own client. Swagger UI, proverbially, is the stick that lets you poke the API to see how it reacts. The API's documentation may be lagging after a change or it could contain mistakes but how the API behaves cannot be hidden from Swagger UI!

I reversed engineered the json object for the patentsview API and am trying to get the patentsview people to adopt it. Try the Swagger 2.0 version here on my site instead of theirs. Or try the Swagger 3.0/Open API version here. Feel free to use the "Try it out!" button after clicking on one of the endpoints. You can cut and paste the parameters shown on my sample pages or invent your own queries to see for yourself just how fun and useful the experience can be. Still not convinced? Try reading this longer explanation with pictures.

The API team has provided a Swagger UI page for the new version of the API, mine above are for the original version of the API. Their Swagger object has a few errors but it's pretty close (my corrected one here here). Note that an API key is required when using the new version of the API. One can be requested here.

PEDS (Patent Examination Data System) is a similar patent API available at ped.uspto.gov They provide a Swagger UI page for their API for the whole world to use.