---
title: "Pexels API: Photo | Perceptlayer"
description: "One Pexels photo by id: size, licence, tags, colours, image links, camera and lens settings, views, downloads, likes and similar photos."
url: https://perceptlayer.com/apis/pexels/photo
---

[APIs](https://perceptlayer.com/apis) / [Pexels](https://perceptlayer.com/apis/pexels) / Photo

# Pexels: Photo

One Pexels photo by id: size, licence, tags, colours, image links, camera and lens settings, views, downloads, likes and similar photos.

GET `/v1/pexels/photo`

## Parameters

Send parameters in the query string.

Required Send `id` or `url`.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `id` | string | Optional | Up to 12 characters One of id or url is required. The numeric photo id, for example 2014422. |
| `url` | string | Optional | Up to 500 characters One of id or url is required. A pexels.com photo link, in any language. |

## Example request

Pexels

GET /v1/pexels/photo?id=2014422 

```
{
  "success": true,
  "data": {
    "id": "2014422",
    "title": "Brown Rocks During Golden Hour",
    "description": "Beautiful desert landscape with large boulders at sunset, showcasing nature's serene beauty.",
    "alt": "Beautiful desert landscape with large boulders at sunset, showcasing nature's serene beauty.",
    "width": 3024,
    "height": 3024,
    "aspect_ratio": 1,
    "average_color": "#978e82",
    "colors": [
      "#696969",
      "#a9a9a9",
      "#d3d3d3"
    ],
    "tags": [
      "Joshua Tree",
      "Desert Sunrise",
      "Desert Sunset"
    ],
    "license": "Pexels",
    "license_url": "https://www.pexels.com/license/",
    "photographer": {
      "name": "Joey F",
      "url": "https://www.pexels.com/@joey/"
    },
    "image": {
      "small": "https://images.pexels.com/photos/2014422/pexels-photo-2014422.jpeg?auto=compress&cs=tinysrgb&h=130",
      "medium": "https://images.pexels.com/photos/2014422/pexels-photo-2014422.jpeg?auto=compress&cs=tinysrgb&w=750",
      "large": "https://images.pexels.com/photos/2014422/pexels-photo-2014422.jpeg?auto=compress&cs=tinysrgb&w=1440",
      "original": "https://images.pexels.com/photos/2014422/pexels-photo-2014422.jpeg?cs=srgb&dl=pexels-joey-2014422.jpg&fm=jpg"
    },
    "created_at": "2019-03-13T19:08:18.000Z",
    "published_at": "2019-03-15T06:40:22.014Z",
    "url": "https://www.pexels.com/photo/brown-rocks-during-golden-hour-2014422/",
    "camera": {
      "make": "Apple",
      "model": "iPhone 6s",
      "aperture": 2.2,
      "focal_length": 4.15,
      "iso": 25,
      "software": "12.1.4",
      "taken_at": "2019-03-02T17:45:10.000Z"
    },
    "file_size": 1294299,
    "stats": {
      "views": 1742390,
      "downloads": 610,
      "likes": 62
    },
    "similar": [
      {
        "id": "2014425",
        "title": "Rocky Landscape under a Scenic Sky",
        "width": 4032,
        "height": 3024,
        "photographer": {
          "name": "Joey F",
          "url": "https://www.pexels.com/@joey/"
        },
        "image": {
          "small": "https://images.pexels.com/photos/2014425/pexels-photo-2014425.jpeg?auto=compress&cs=tinysrgb&h=130",
          "medium": "https://images.pexels.com/photos/2014425/pexels-photo-2014425.jpeg?auto=compress&cs=tinysrgb&w=750"
        },
        "url": "https://www.pexels.com/photo/rocky-landscape-under-a-scenic-sky-2014425/"
      },
      {
        "id": "2014423",
        "title": "Scenic Sky over Rocky Landscape",
        "width": 4032,
        "height": 3024,
        "photographer": {
          "name": "Joey F",
          "url": "https://www.pexels.com/@joey/"
        },
        "image": {
          "small": "https://images.pexels.com/photos/2014423/pexels-photo-2014423.jpeg?auto=compress&cs=tinysrgb&h=130",
          "medium": "https://images.pexels.com/photos/2014423/pexels-photo-2014423.jpeg?auto=compress&cs=tinysrgb&w=750"
        },
        "url": "https://www.pexels.com/photo/scenic-sky-over-rocky-landscape-2014423/"
      },
      {
        "id": "2014424",
        "title": "Plants on Desert",
        "width": 4032,
        "height": 3024,
        "photographer": {
          "name": "Joey F",
          "url": "https://www.pexels.com/@joey/"
        },
        "image": {
          "small": "https://images.pexels.com/photos/2014424/pexels-photo-2014424.jpeg?auto=compress&cs=tinysrgb&h=130",
          "medium": "https://images.pexels.com/photos/2014424/pexels-photo-2014424.jpeg?auto=compress&cs=tinysrgb&w=750"
        },
        "url": "https://www.pexels.com/photo/plants-on-desert-2014424/"
      }
    ]
  },
  "meta": {
    "request_id": "req_21bcb3c6d383410a94de45cf86d28696",
    "credits_charged": 1,
    "credits_remaining": 164
  }
}
```

200 OK JSON X-Credits-Used: 1

Recorded from our API and shortened.

[Run this endpoint in the playground](https://perceptlayer.com/apis/pexels?try=photo#playground) with your own parameters. 1 credit per successful call; failed calls are free.

## Response fields

`data` has these 21 fields, read from a recorded call. The recording leaves out fields that were empty, so a live call can return more.

| Field | Type |
| --- | --- |
| `id` | string |
| `title` | string |
| `description` | string |
| `alt` | string |
| `width` | integer |
| `height` | integer |
| `aspect_ratio` | integer |
| `average_color` | string |
| `colors` | string\[\] |
| `tags` | string\[\] |
| `license` | string |
| `license_url` | url |
| `photographer` | object |
| `image` | object |
| `created_at` | string |
| `published_at` | string |
| `url` | url |
| `camera` | object |
| `file_size` | integer |
| `stats` | object |
| `similar` | object\[\] |
