- What is Unsplash API?
- Getting Started
- API Request Limits
- HTTP Verbs & Error Messages
- Photos 📷
- Search 🔍
- Collection 🗂️
- Topics 🗒
Get a photo by ID
GET
https://api.unsplash.com/photos/{id}
Request
Path Params
id
integer
required
Example:
rdtkE1fHi6c
Query Params
client_id
string
required
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.unsplash.com/photos/rdtkE1fHi6c?client_id='
Responses
🟢200The requested photo
application/json
Body
id
string
optional
created_at
string <date-time>
optional
updated_at
string <date-time>
optional
width
integer
optional
height
integer
optional
color
string
optional
likes
integer
optional
liked_by_user
boolean
optional
description
string
optional
user
object (User)
optional
id
string
optional
username
string
optional
name
string
optional
portfolio_url
string
optional
bio
string
optional
location
string
optional
total_likes
integer
optional
total_photos
integer
optional
total_collections
integer
optional
profile_image
object
optional
links
object
optional
urls
object
optional
raw
string
optional
full
string
optional
regular
string
optional
small
string
optional
thumb
string
optional
links
object
optional
self
string
optional
html
string
optional
download
string
optional
download_location
string
optional
Example
{
"id": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"width": 0,
"height": 0,
"color": "string",
"likes": 0,
"liked_by_user": true,
"description": "string",
"user": {
"id": "string",
"username": "string",
"name": "string",
"portfolio_url": "string",
"bio": "string",
"location": "string",
"total_likes": 0,
"total_photos": 0,
"total_collections": 0,
"profile_image": {
"small": "string",
"medium": "string",
"large": "string"
},
"links": {
"self": "string",
"html": "string",
"photos": "string",
"likes": "string"
}
},
"urls": {
"raw": "string",
"full": "string",
"regular": "string",
"small": "string",
"thumb": "string"
},
"links": {
"self": "string",
"html": "string",
"download": "string",
"download_location": "string"
}
}
Modified at 2024-04-08 15:41:55