API docs & params explained

Hello, I am wanting to make my own iNat widget based of the API docs, I am seeing 2:

I am wanting to know, which I can’t find on the docs, what params are available. I am wanting to grab observations for a specific project ID, as well as limit the results and define the size of the image I want.

Thanks!

If you scroll down and expand, the params are documented on that page:

Thank you for your reply, but I am not seeing all the documentation for all available params on there.

For example:
This returns 200
https://api.inaturalist.org/v2/observations?project_id=17548

I do not see project_id listed as a valid param on v1 I do see project_ids

On v2 I do see project_id but that only accepts an array where as my 200 url I posted is a string/number

Are the swagger docs just out dated? Is there a comprehensive list for the API that shows all the param each method can take? And what about defining the size of the photo.

Hello,
Both v1 and v2 /observations have a param “project_id” that takes an array as input. In your request you also specified an array, just with one element. E.g., this https://api.inaturalist.org/v2/observations?project_id=17548,17549 has two elements and therefore more total results.

it seems like you might be confusing two different routes / endpoints and their model responses vs their parameters:

  • https://api.inaturalist.org/v1/observations/{id}
  • https://api.inaturalist.org/v1/observations

it’s the second one above that accepts a project_id parameter, not the first.

Thanks, I was able to re-create the iNat project thumbnails and make my own widget.

its not perfect, but does what I need:

Here is a link to my pen: https://codepen.io/elaniobro/pen/oNQzKZd

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.