Reputation: 1695
EDIT: NASA data can be accessed via the SODA API (see https://data.nasa.gov/developer), and the API referred to below seems to be deprecated.
I'm trying to use the NASA API (http://nasa.github.io/api-docs/#introduction) to pull information on NASA patents. The docs show what the JSON reponse should look like and list required parameters for the request, but I can't find any examples of a properly formed request URL. So far I have tried (with my API key):
https://api.nasa.gov/patents/optics?api_key=API_KEY
https://api.nasa.gov/patents/optics.json?api_key=API_KEY
I tested the API key out on an example GET request URL for a different data.gov agency and it returned a valid JSON response, but I've had no luck with the NASA requests.
Does anyone know the proper request format for NASA info from the data.gov API?
Upvotes: 0
Views: 1493
Reputation: 2969
I think that there may be a be a better api to use that is actually on NASA's site here: https://data.nasa.gov/developer.
If you scroll down to "NASA Patents" you can see some documentation on how to use the api and a few sample requests to get you started, including how to filter on specific fields.
Upvotes: 1
Reputation: 71422
Reading the API documentation, it would seem that the category name (like optics
in your example), should be passed a query parameter, not as part of URI as you are showing. I also don't see noted where they say they support https (of course I just skimmed the API). Try,
http://api.nasa.gov/patents?category=optics&api_key=API_KEY
Upvotes: 1