API: GET /api/v1/photos should also return face information #2211

Open
opened 2026-02-20 01:08:03 -05:00 by deekerman · 2 comments
Owner

Originally created by @DrDonoso on GitHub (Nov 6, 2024).

Describe what problem this solves and why this would be valuable to many users

I'm using the api to return a random photo at api/v1/photos. I would like to see the faces appearing in the photo.
When seeing the API, the faces are not returned in the response.
I can see the call at api/v1/photos/{uid} return faces, but it returns a number instead of the faces object.

It would be nice to return an array with the faces detected.

Thanks for your great effort! 😊

Describe the solution you'd like

Improve /api/v1/photos and /api/v1/photos/{uid} to return the faces object.

Describe alternatives you've considered

Additional context

Originally created by @DrDonoso on GitHub (Nov 6, 2024). **Describe what problem this solves and why this would be valuable to many users** I'm using the api to return a random photo at _api/v1/photos_. I would like to see the faces appearing in the photo. When seeing the [API](https://docs.photoprism.dev/#/Photos/SearchPhotos), the faces are not returned in the response. I can see the call at _api/v1/photos/{uid}_ return faces, but it returns a number instead of the faces object. It would be nice to return an array with the faces detected. Thanks for your great effort! 😊 **Describe the solution you'd like** Improve /api/v1/photos and /api/v1/photos/{uid} to return the faces object. **Describe alternatives you've considered** - **Additional context** -
Author
Owner

@lastzero commented on GitHub (Nov 6, 2024):

We probably won't be able to do this for performance reasons, as it would most likely require at least one additional query for each result - unless you just want the comma-separated names?

@lastzero commented on GitHub (Nov 6, 2024): We probably won't be able to do this for performance reasons, as it would most likely require at least one additional query for each result - unless you just want the comma-separated names?
Author
Owner

@DrDonoso commented on GitHub (Nov 6, 2024):

I understand; comma-separated names would be nice if it's possible and don't have any impact in performance.

@DrDonoso commented on GitHub (Nov 6, 2024): I understand; comma-separated names would be nice if it's possible and don't have any impact in performance.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/photoprism#2211
No description provided.