# Pixabay

> Search Pixabay's library of royalty-free images and videos, and pull download links and contributor credits into your workflows.

App · Images & Design · 3 actions. Web page: https://docs.lodol.com/docs/integrations/pixabay

## Actions

### Get an image

Look up one image by its Pixabay ID, including every download size and the contributor's name.

**Inputs**

- Image ID (`image_id`, text, required): The image's Pixabay ID, as returned by Search images.

**Outputs**

- `downloads` (number): How many times it has been downloaded
- `full_hd_url` (text): Link to a version up to 1920px. Only accounts approved for full API access get this, so it falls back to the 1280px version.
- `height` (number): Height of the original image in pixels
- `image_id` (number): The image's Pixabay ID. Use with Get an image.
- `large_image_url` (text): Link to a version no larger than 1280px
- `likes` (number): How many likes it has
- `page_url` (text): Link to the media's page on Pixabay, where it can be downloaded
- `preview_url` (text): Link to a thumbnail no larger than 150px
- `tags` (list): The tags Pixabay files this under
- `type` (text): What kind of image it is: 'photo', 'illustration', or 'vector'
- `user` (text): Username of the contributor
- `user_id` (number): Pixabay ID of the contributor
- `views` (number): How many times it has been viewed
- `webformat_url` (text): Link to a 640px version. Pixabay expires this link after 24 hours.
- `width` (number): Width of the original image in pixels

**Example output**

```json
{
  "downloads": 6439,
  "full_hd_url": "https://pixabay.com/get/ed6a9369fd0a76647_1920.jpg",
  "height": 2250,
  "image_id": 195893,
  "large_image_url": "https://pixabay.com/get/ed6a99fd0a76647_1280.jpg",
  "likes": 5,
  "page_url": "https://pixabay.com/photos/blossom-bloom-flower-195893/",
  "preview_url": "https://cdn.pixabay.com/photo/2013/10/15/flower-195893_150.jpg",
  "tags": [
    "blossom",
    "bloom",
    "flower"
  ],
  "type": "photo",
  "user": "Josch13",
  "user_id": 48777,
  "views": 7671,
  "webformat_url": "https://pixabay.com/get/35bbf209e13e39d2_640.jpg",
  "width": 4000
}
```

### Search images

Search Pixabay's library of royalty-free photos, illustrations, and vectors.

**Inputs**

- Search term (`query`, text): What to look for, for example 'yellow flowers'. Leave empty to browse everything. Maximum 100 characters.
- Image type (`image_type`, text): Optional. Only return one kind of image. One of: `all`, `photo`, `illustration`, `vector`.
- Orientation (`orientation`, text): Optional. Only return images in this shape. One of: `all`, `horizontal`, `vertical`.
- Category (`category`, text): Optional. Only return media filed under this category. One of: `backgrounds`, `fashion`, `nature`, `science`, `education`, `feelings`, `health`, `people`, `religion`, `places`, and 10 more.
- Colours (`colors`, text): Optional. Only return images with these colour properties. Separate several with commas, for example 'red,yellow'. Choose from: grayscale, transparent, red, orange, yellow, green, turquoise, blue, lilac, pink, white, gray, black, brown.
- Editor's Choice only (`editors_choice`, true/false): Only return media that has won an Editor's Choice award. Default: `false`.
- Safe search (`safesearch`, true/false): Only return media suitable for all ages. Default: `false`.
- Sort by (`order`, text): How to order the results. Defaults to most popular. One of: `popular` (Most popular), `latest` (Most recent).
- Minimum width (`min_width`, number): Optional. Leave out media narrower than this, in pixels. At least 0.
- Minimum height (`min_height`, number): Optional. Leave out media shorter than this, in pixels. At least 0.
- Page (`page`, number): Which page of results to return. Defaults to the first page. At least 1. Default: `1`.
- Results per page (`per_page`, number): How many results to return (3-200). From 3 to 200. Default: `20`.

**Outputs**

- `images` (list): The matching images
- `total` (number): How many results match in total
- `total_hits` (number): How many of those the API will page through -- usually lower than the total, because Pixabay caps API paging at 500 by default

**Example output**

```json
{
  "images": [
    {
      "downloads": 6439,
      "full_hd_url": "https://pixabay.com/get/ed6a9369fd0a76647_1920.jpg",
      "height": 2250,
      "image_id": 195893,
      "large_image_url": "https://pixabay.com/get/ed6a99fd0a76647_1280.jpg",
      "likes": 5,
      "page_url": "https://pixabay.com/photos/blossom-bloom-flower-195893/",
      "preview_url": "https://cdn.pixabay.com/photo/2013/10/15/flower-195893_150.jpg",
      "tags": [
        "blossom",
        "bloom",
        "flower"
      ],
      "type": "photo",
      "user": "Josch13",
      "user_id": 48777,
      "views": 7671,
      "webformat_url": "https://pixabay.com/get/35bbf209e13e39d2_640.jpg",
      "width": 4000
    }
  ],
  "total": 4692,
  "total_hits": 500
}
```

### Search videos

Search Pixabay's library of royalty-free stock videos.

**Inputs**

- Search term (`query`, text): What to look for, for example 'yellow flowers'. Leave empty to browse everything. Maximum 100 characters.
- Video type (`video_type`, text): Optional. Only return one kind of video. One of: `all`, `film`, `animation`.
- Category (`category`, text): Optional. Only return media filed under this category. One of: `backgrounds`, `fashion`, `nature`, `science`, `education`, `feelings`, `health`, `people`, `religion`, `places`, and 10 more.
- Editor's Choice only (`editors_choice`, true/false): Only return media that has won an Editor's Choice award. Default: `false`.
- Safe search (`safesearch`, true/false): Only return media suitable for all ages. Default: `false`.
- Sort by (`order`, text): How to order the results. Defaults to most popular. One of: `popular` (Most popular), `latest` (Most recent).
- Minimum width (`min_width`, number): Optional. Leave out media narrower than this, in pixels. At least 0.
- Minimum height (`min_height`, number): Optional. Leave out media shorter than this, in pixels. At least 0.
- Page (`page`, number): Which page of results to return. Defaults to the first page. At least 1. Default: `1`.
- Results per page (`per_page`, number): How many results to return (3-200). From 3 to 200. Default: `20`.

**Outputs**

- `total` (number): How many results match in total
- `total_hits` (number): How many of those the API will page through -- usually lower than the total, because Pixabay caps API paging at 500 by default
- `videos` (list): The matching videos

**Example output**

```json
{
  "total": 42,
  "total_hits": 42,
  "videos": [
    {
      "downloads": 1464,
      "duration": 12,
      "height": 1080,
      "likes": 18,
      "page_url": "https://pixabay.com/videos/id-125/",
      "size_name": "large",
      "tags": [
        "flowers",
        "yellow",
        "blossom"
      ],
      "thumbnail_url": "https://cdn.pixabay.com/video/2015/08/08/125-135736646_large.jpg",
      "type": "film",
      "user": "CoverrFreeFootage",
      "user_id": 1234,
      "video_id": 125,
      "video_url": "https://cdn.pixabay.com/video/2015/08/08/125-135736646_large.mp4",
      "views": 4462,
      "width": 1920
    }
  ]
}
```
