# Unsplash Integration via LowCodeAPI

## Overview

Stock photos

## Base Endpoint

```
https://api.lowcodeapi.com/unsplash/
```

## Authentication

LowCodeAPI handles authentication automatically. You only need to:

1. **Sign up** at [Unsplash](https://unsplash.com)
2. **Get your credentials** from [credential page](https://unsplash.com/oauth/applications)
3. **Connect your account** in LowCodeAPI dashboard
4. **Use your `api_token`** in all requests

**Auth Type**: TOKEN

## API Categories

- **Collections** - 9 endpoints
- **Current user** - 2 endpoints
- **Photos** - 8 endpoints
- **Search** - 3 endpoints
- **Stats** - 2 endpoints
- **Topics** - 3 endpoints
- **Users** - 6 endpoints

## Common Endpoints

### Category: Collections

#### List collections

**Method**: `GET` | **LowCodeAPI Path**: `/collections`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/collections?page={page}&per_page={per_page}&api_token={api_token}
```

**Description**: List collections

**Query Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`page` | number | No | Page number to retrieve |
|`per_page` | number | No | Number of items per page |

---

#### Get a collection

**Method**: `GET` | **LowCodeAPI Path**: `/collections/id`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/collections/id?api_token={api_token}
```

**Description**: Get a collection

**Path Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`id` | string | Yes | The collections’s ID |

---

#### Get a collection's photos

**Method**: `GET` | **LowCodeAPI Path**: `/collections/id/photos`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/collections/id/photos?page={page}&per_page={per_page}&orientation={orientation}&api_token={api_token}
```

**Description**: Get a collection's photos

**Path Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`id` | string | Yes | The collections’s ID |

**Query Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`page` | number | No | Page number to retrieve |
|`per_page` | number | No | Number of items per page |
|`orientation` | string | No | Filter by photo orientation |

---

#### List a collection's related collections

**Method**: `GET` | **LowCodeAPI Path**: `/collections/id/related`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/collections/id/related?api_token={api_token}
```

**Description**: List a collection's related collections

**Path Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`id` | string | Yes | The collections’s ID |

---

#### Create a new collection

**Method**: `POST` | **LowCodeAPI Path**: `/collections`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/collections?api_token={api_token}
```

**Description**: OAuth is required for this

**Request Body**:
```json
{
  "title": "<string>"
}
```

---

#### Update an existing collection

**Method**: `PUT` | **LowCodeAPI Path**: `/collections/id`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/collections/id?api_token={api_token}
```

**Description**: OAuth is required for this

**Path Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`id` | string | Yes | The collections’s ID |

**Request Body**:
```json
{
  "key": "value"
}
```

---

#### Delete a collection

**Method**: `DELETE` | **LowCodeAPI Path**: `/collections/id`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/collections/id?api_token={api_token}
```

**Description**: OAuth is required for this

**Path Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`id` | string | Yes | The collections’s ID |

---

#### Add a photo to a collection

**Method**: `POST` | **LowCodeAPI Path**: `/collections/collection_id/add`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/collections/collection_id/add?api_token={api_token}
```

**Description**: OAuth is required for this

**Path Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`collection_id` | string | Yes | The collection’s ID. |

**Request Body**:
```json
{
  "photo_id": "<string>"
}
```

---

#### Remove a photo from a collection

**Method**: `GET` | **LowCodeAPI Path**: `/collections/collection_id/remove`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/collections/collection_id/remove?photo_id={photo_id}&api_token={api_token}
```

**Description**: OAuth is required for this

**Path Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`collection_id` | string | Yes | The collection’s ID |

**Query Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`photo_id` | string | Yes | The photo’s ID |

---

### Category: Current user

#### Get the users profile

**Method**: `GET` | **LowCodeAPI Path**: `/me`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/me?api_token={api_token}
```

**Description**: OAuth is required for this

---

#### Update the current user's profile

**Method**: `PUT` | **LowCodeAPI Path**: `/me`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/me?api_token={api_token}
```

**Description**: OAuth is required for this

**Request Body**:
```json
{
  "key": "value"
}
```

---

### Category: Photos

#### List photos

**Method**: `GET` | **LowCodeAPI Path**: `/photos`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/photos?page={page}&per_page={per_page}&order_by={order_by}&api_token={api_token}
```

**Description**: List photos

**Query Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`page` | string | No | Page number to retrieve |
|`per_page` | string | No | Number of items per page |
|`order_by` | string | No | sort the photos |

---

#### Get a photo

**Method**: `GET` | **LowCodeAPI Path**: `/photos/id`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/photos/id?api_token={api_token}
```

**Description**: Get a photo

**Path Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`id` | string | Yes | The photo’s ID |

---

#### Get a random photo

**Method**: `GET` | **LowCodeAPI Path**: `/photos/random`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/photos/random?collections={collections}&topics={topics}&username={username}&orientation={orientation}&content_filter={content_filter}&count={count}&api_token={api_token}
```

**Description**: Get a random photo

**Query Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`collections` | string | No | Public collection ID(‘s) to filter selection |
|`topics` | string | No | Public topic ID(‘s) to filter selection |
|`username` | string | No | Limit selection to a single user |
|`orientation` | string | No | Filter by photo orientation |
|`content_filter` | string | No | Limit results by content safety |
|`count` | number | No | The number of photos to return |

---

#### Get a photo's statistics

**Method**: `GET` | **LowCodeAPI Path**: `/photos/id/statistics`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/photos/id/statistics?resolution={resolution}&quantity={quantity}&api_token={api_token}
```

**Description**: Get a photo's statistics

**Path Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`id` | string | Yes | The public id of the photo |

**Query Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`resolution` | string | No | The frequency of the stats |
|`quantity` | number | No | The amount of for each stat |

---

#### Track a photo download

**Method**: `GET` | **LowCodeAPI Path**: `/photos/id/download`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/photos/id/download?api_token={api_token}
```

**Description**: Track a photo download

**Path Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`id` | string | Yes | The photo’s ID |

---

#### Update a photo

**Method**: `PUT` | **LowCodeAPI Path**: `/photos/id`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/photos/id?api_token={api_token}
```

**Description**: OAuth is required for this

**Path Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`id` | string | Yes | The photo’s ID |

**Request Body**:
```json
{
  "key": "value"
}
```

---

#### Like a photo

**Method**: `POST` | **LowCodeAPI Path**: `/photos/id/like`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/photos/id/like?api_token={api_token}
```

**Description**: OAuth is required for this

**Path Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`id` | string | Yes | The photo’s ID |

---

#### Unlike a photo

**Method**: `DELETE` | **LowCodeAPI Path**: `/photos/id/like`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/photos/id/like?api_token={api_token}
```

**Description**: OAuth is required for this

**Path Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`id` | string | Yes | The photo’s ID |

---

### Category: Search

#### Search photos

**Method**: `GET` | **LowCodeAPI Path**: `/search/photos`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/search/photos?query={query}&page={page}&per_page={per_page}&order_by={order_by}&collections={collections}&content_filter={content_filter}&color={color}&orientation={orientation}&api_token={api_token}
```

**Description**: Search photos

**Query Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`query` | string | No | Search terms. |
|`page` | number | No | Page number to retrieve |
|`per_page` | number | No | Number of items per page |
|`order_by` | string | No | How to sort the photos.Valid values are latest and relevant |
|`collections` | string | No | Collection ID(‘s) to narrow search |
|`content_filter` | string | No | Limit results by content safety |
|`color` | string | No | Filter results by color |
|`orientation` | enum | No | Filter by photo orientation |

---

#### Search collections

**Method**: `GET` | **LowCodeAPI Path**: `/search/collections`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/search/collections?query={query}&page={page}&per_page={per_page}&api_token={api_token}
```

**Description**: Search collections

**Query Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`query` | string | No | Search terms |
|`page` | number | No | Page number to retrieve |
|`per_page` | number | No | Number of items per page |

---

#### Search users

**Method**: `GET` | **LowCodeAPI Path**: `/search/users`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/search/users?query={query}&page={page}&per_page={per_page}&api_token={api_token}
```

**Description**: Search users

**Query Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`query` | string | No | Search terms |
|`page` | number | No | Page number to retrieve |
|`per_page` | number | No | Number of items per page |

---

### Category: Stats

#### Totals

**Method**: `GET` | **LowCodeAPI Path**: `/stats/total`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/stats/total?api_token={api_token}
```

**Description**: Totals

---

#### Month

**Method**: `GET` | **LowCodeAPI Path**: `/stats/month`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/stats/month?api_token={api_token}
```

**Description**: Month

---

### Category: Topics

#### List topics

**Method**: `GET` | **LowCodeAPI Path**: `/topics`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/topics?page={page}&per_page={per_page}&order_by={order_by}&api_token={api_token}
```

**Description**: List topics

**Path Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`ids` | string | No | Limit to only matching topic ids or slugs. |

**Query Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`page` | number | No | Page number to retrieve |
|`per_page` | number | No | Number of items per page |
|`order_by` | string | No | sort the topics |

---

#### Get a topic

**Method**: `GET` | **LowCodeAPI Path**: `/topics/id_or_slug`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/topics/id_or_slug?api_token={api_token}
```

**Description**: Get a topic

**Path Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`id_or_slug` | string | Yes | The topics’s ID or slug |

---

#### Get a topic's photos

**Method**: `GET` | **LowCodeAPI Path**: `/topics/id_or_slug/photos`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/topics/id_or_slug/photos?per_page={per_page}&orientation={orientation}&order_by={order_by}&api_token={api_token}
```

**Description**: Get a topic's photos

**Path Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`id_or_slug` | string | Yes | The topics’s ID or slug |

**Query Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`per_page` | number | No | Number of items per page |
|`orientation` | string | No | Filter by photo orientation |
|`order_by` | string | No | How to sort the photos |

---

### Category: Users

#### Get a user's public profile

**Method**: `GET` | **LowCodeAPI Path**: `/users/username`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/users/username?api_token={api_token}
```

**Description**: Get a user's public profile

**Path Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`username` | string | Yes | The user’s username |

---

#### Get a user's portfolio link

**Method**: `GET` | **LowCodeAPI Path**: `/users/username/portfolio`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/users/username/portfolio?api_token={api_token}
```

**Description**: Get a user's portfolio link

**Path Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`username` | string | Yes | The user’s username |

---

#### List a user’s photos

**Method**: `GET` | **LowCodeAPI Path**: `/users/username/photos`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/users/username/photos?page={page}&per_page={per_page}&order_by={order_by}&stats={stats}&resolution={resolution}&quantity={quantity}&api_token={api_token}
```

**Description**: List a user’s photos

**Path Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`username` | string | Yes | The user’s username |

**Query Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`page` | number | No | Page number to retrieve |
|`per_page` | number | No | Number of items per page |
|`order_by` | string | No | How to sort the photos |
|`stats` | boolean | No | Show the stats for each user’s photo |
|`resolution` | string | No | The frequency of the stats |
|`quantity` | number | No | The amount of for each stats |

---

#### List a user's liked photos

**Method**: `GET` | **LowCodeAPI Path**: `/users/username/likes`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/users/username/likes?page={page}&per_page={per_page}&order_by={order_by}&orientation={orientation}&api_token={api_token}
```

**Description**: List a user's liked photos

**Path Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`username` | string | Yes | The user’s username |

**Query Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`page` | number | No | Page number to retrieve |
|`per_page` | number | No | Number of items per page |
|`order_by` | string | No | How to sort the photos |
|`orientation` | string | No | Filter by photo orientation |

---

#### List a user's collections

**Method**: `GET` | **LowCodeAPI Path**: `/users/username/collections`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/users/username/collections?page={page}&per_page={per_page}&api_token={api_token}
```

**Description**: List a user's collections

**Path Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`username` | string | Yes | The user’s username |

**Query Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`page` | number | No | Page number to retrieve. |
|`per_page` | number | No | Number of items per page |

---

#### Get a user's statistics

**Method**: `GET` | **LowCodeAPI Path**: `/users/username/statistics`

**Full URL**:
```
https://api.lowcodeapi.com/unsplash/users/username/statistics?resolution={resolution}&quantity={quantity}&api_token={api_token}
```

**Description**: Get a user's statistics

**Path Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`username` | string | Yes | The user’s username |

**Query Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
|`resolution` | string | No | The frequency of the stats |
|`quantity` | number | No | The amount of for each stats |

---

## Complete Endpoint Reference

For a complete list of all 33 endpoints, refer to:
- **OpenAPI Definition**: `https://backend.lowcodeapi.com/unsplash/definition`
- **Official Provider Documentation**: https://unsplash.com/documentation