# (Python/Node API) Photo access possible?

**URL:** <https://forum.inaturalist.org/t/python-node-api-photo-access-possible/13391>\
**Category:** General\
**Created:** [June 15, 2020, 9:15am UTC](https://forum.inaturalist.org/t/python-node-api-photo-access-possible/13391 "2020-06-15T09:15:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrissw](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.inaturalist.org/chrissw/32/10124_2.png) [@chrissw](https://forum.inaturalist.org/u/chrissw)\
**Post date:** [June 15, 2020, 9:15am UTC](https://forum.inaturalist.org/t/python-node-api-photo-access-possible/13391/1 "2020-06-15T09:15:09Z")

</div>

Hi all,

this is a rather technical question, not sure if this is the right channel… sorry if not.

As a toy project both to learn kivy (a very portable python gui framework) and to get better in identifying butterflies, I decided to write a python program which shows random butterfly images and a couple of suggestions for their species to choose from. However, it seems I get only URLs to the small thumbnail images as a request response. What I do is:

from pyinaturalist.node\_api import get\_observation  
obs = get\_observation(37311466) # one of mine  
print(obs[‘photos’][0][‘url’]) # yields [https://static.inaturalist.org/photos/59125544/square.jpeg?1578255703](https://static.inaturalist.org/photos/59125544/square.jpeg?1578255703), which is the thumbnail image.

Is there a way in the API to get the original or at least a larger version? Do I miss something, maybe I have get a login token to access images, or search for certain license types? I have spent an hour or two searching through the api documentation, but have neither found a statement that ‘url’ is the thumbnail URL nor a way to access the original. Of course it could also be a bug in the pyinaturalist interface, but I doubt it changes the json response…

If there is no solution for that, I have to change the app from butterflies to pokemon. My son would love that :)

Best regards  
Chriss

---

<div class="post-metadata">

**Author:** ![hanly](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.inaturalist.org/hanly/32/57400_2.png) [@hanly](https://forum.inaturalist.org/u/hanly)\
**Post date:** [June 15, 2020, 10:57am UTC](https://forum.inaturalist.org/t/python-node-api-photo-access-possible/13391/2 "2020-06-15T10:57:00Z")

</div>

I’m unsure if there is a more elegant solution, but if you replace “square.jpeg” with “original.jpeg” after you pull the image URL then it will be for the full sized image:

imgurl = “[https://static.inaturalist.org/photos/59125544/square.jpeg?1578255703](https://static.inaturalist.org/photos/59125544/square.jpeg?1578255703)”  
print(imgurl.replace(“square”, “original”))

yields:  
[https://static.inaturalist.org/photos/59125544/original.jpeg?1578255703](https://static.inaturalist.org/photos/59125544/original.jpeg?1578255703)

that you could add as a step in the program for each image pulled.

---

<div class="post-metadata">

**Author:** ![alexis18](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.inaturalist.org/alexis18/32/42420_2.png) [@alexis18](https://forum.inaturalist.org/u/alexis18)\
**Post date:** [June 15, 2020, 1:38pm UTC](https://forum.inaturalist.org/t/python-node-api-photo-access-possible/13391/3 "2020-06-15T13:38:37Z")

</div>

This is usually what I do.  
You can also replace with large.jpeg, which can be helpful if the image size is rather small to start

---

<div class="post-metadata">

**Author:** ![pisum](https://avatars.discourse-cdn.com/v4/letter/p/91b2a8/32.png) [@pisum](https://forum.inaturalist.org/u/pisum)\
**Post date:** [June 15, 2020, 1:47pm UTC](https://forum.inaturalist.org/t/python-node-api-photo-access-possible/13391/4 "2020-06-15T13:47:24Z")

</div>

[https://www.inaturalist.org/photos/59125544](https://www.inaturalist.org/photos/59125544)  
[https://www.inaturalist.org/photos/59125544?size=small](https://www.inaturalist.org/photos/59125544?size=small)  
[https://www.inaturalist.org/photos/59125544?size=medium](https://www.inaturalist.org/photos/59125544?size=medium)  
[https://www.inaturalist.org/photos/59125544?size=large](https://www.inaturalist.org/photos/59125544?size=large)  
[https://www.inaturalist.org/photos/59125544?size=original](https://www.inaturalist.org/photos/59125544?size=original)

[https://static.inaturalist.org/photos/59125544/small.jpeg](https://static.inaturalist.org/photos/59125544/small.jpeg)  
[https://static.inaturalist.org/photos/59125544/medium.jpeg](https://static.inaturalist.org/photos/59125544/medium.jpeg)  
[https://static.inaturalist.org/photos/59125544/large.jpeg](https://static.inaturalist.org/photos/59125544/large.jpeg)  
[https://static.inaturalist.org/photos/59125544/original.jpeg](https://static.inaturalist.org/photos/59125544/original.jpeg)

[https://static.inaturalist.org/photos/59125544/square.jpeg](https://static.inaturalist.org/photos/59125544/square.jpeg)  
[https://static.inaturalist.org/photos/59125544/thumb.jpeg](https://static.inaturalist.org/photos/59125544/thumb.jpeg)

it’s best to pull the smallest version of the photo that you need for your use case.

EDIT: it may also be worth noting that:

1. the best way to get better at identifying is probably to identify ([https://forum.inaturalist.org/t/recruiting-more-identifiers/2388](https://forum.inaturalist.org/t/recruiting-more-identifiers/2388), [https://www.inaturalist.org/blog/35758-we-ve-reached-1-000-000-observers](https://www.inaturalist.org/blog/35758-we-ve-reached-1-000-000-observers))
2. folks have made other quiz type things ([https://forum.inaturalist.org/t/how-well-do-you-know-your-local-wildlife-now-you-can-test-yourself/10711](https://forum.inaturalist.org/t/how-well-do-you-know-your-local-wildlife-now-you-can-test-yourself/10711)), but as far as i know, no one has made anything to display a photo slideshow ([https://forum.inaturalist.org/t/presentation-mode-as-a-full-screen-slideshow-of-observation-images/8316](https://forum.inaturalist.org/t/presentation-mode-as-a-full-screen-slideshow-of-observation-images/8316)), nor a more modern way to share observations on social media ([https://forum.inaturalist.org/t/share-observations-with-one-click-to-other-social-media/1214](https://forum.inaturalist.org/t/share-observations-with-one-click-to-other-social-media/1214)).
3. if you know Python or want to learn Python (beyond kivy), there’s this project, which i believe is done in Python: [https://forum.inaturalist.org/t/seeking-discord-bot-development-collaborators/7137](https://forum.inaturalist.org/t/seeking-discord-bot-development-collaborators/7137).

welcome to the forum.

---

<div class="post-metadata">

**Author:** ![benarmstrong](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.inaturalist.org/benarmstrong/32/1543_2.png) [@benarmstrong](https://forum.inaturalist.org/u/benarmstrong)\
**Post date:** [June 15, 2020, 5:15pm UTC](https://forum.inaturalist.org/t/python-node-api-photo-access-possible/13391/5 "2020-06-15T17:15:17Z")

</div>

Thanks for the plug for [Dronefly](https://github.com/synrg/dronefly). Yes, it’s Python, and we’re still seeking collaborators.

---

<div class="post-metadata">

**Author:** ![chrissw](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.inaturalist.org/chrissw/32/10124_2.png) [@chrissw](https://forum.inaturalist.org/u/chrissw)\
**Post date:** [June 15, 2020, 8:10pm UTC](https://forum.inaturalist.org/t/python-node-api-photo-access-possible/13391/6 "2020-06-15T20:10:09Z")

</div>

Thank you all for the answers - that should get me going.  
Special thanks for the above remarks and links. I will read through them the next few days as I find time for that.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/inaturalist/original/2X/7/7831452cf7f0d653ff1ffd34176334b7ef1b6a17.png) [@system](https://forum.inaturalist.org/u/system)\
**Post date:** [August 14, 2020, 8:10pm UTC](https://forum.inaturalist.org/t/python-node-api-photo-access-possible/13391/7 "2020-08-14T20:10:10Z")

</div>

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