# Pixabay Integration via LowCodeAPI
## Overview
Pixabay provides a vast library of free stock images, videos, and music. The Pixabay API allows developers to:
- **Search Images** - Find high-quality photos and illustrations
- **Search Videos** - Browse video clips and footage
- **Image Details** - Get detailed information about specific images
## Base Endpoint
```
https://api.lowcodeapi.com/pixabay/
```
## Authentication
LowCodeAPI handles authentication automatically using API Key authentication. You only need to:
1. **Sign up** at [Pixabay](https://pixabay.com) to get your API Key
2. **Connect your account** in the LowCodeAPI dashboard
3. **Use your `api_token`** in all requests
The `api_token` is your LowCodeAPI authentication token. LowCodeAPI will automatically:
- Fetch your Pixabay API key
- Apply it to each request as a query parameter
**Auth Type**: API Key (Query Parameter)
## API Categories
- **Media & Assets** - Stock images, videos, and music
## Common Endpoints
### Category: API
#### Search Images
**Method**: `GET` | **LowCodeAPI Path**: `/api`
**Full URL**:
```
https://api.lowcodeapi.com/pixabay/api?q={q}&api_token={api_token}
```
**Description**: Search for images using a query string.
**Query Parameters**:
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `q` | string | No | URL-encoded search term |
| `lang` | string | No | Language code: cs, da, de, en, es, fr, id, it, hu, nl, no, pl, pt, ro, sk, fi, sv, tr, vi, th, bg, ru, el, ja, ko, zh |
| `id` | string | No | Retrieve images by unique IDs (comma-separated) |
| `image_type` | enum | No | Filter by type: all, photo, illustration, vector |
| `orientation` | string | No | Filter by orientation: horizontal, vertical |
| `category` | string | No | Filter by category: backgrounds, fashion, nature, science, education, feelings, health, people, religion, places, animals, industry, computer, food, sports, transportation, travel, buildings, business, music |
| `min_width` | integer | No | Minimum image width |
| `min_height` | integer | No | Minimum image height |
| `colors` | string | No | Filter by color: grays, translucent, red, orange, yellow, green, turquoise, blue, violet, pink, brown, black, white |
| `editors_choice` | boolean | No | Select images by Editor's Choice |
| `safesearch` | boolean | No | Safesearch flag (default: true) |
| `order` | enum | No | Results order: popular, latest |
| `page` | integer | No | Page number (default: 1) |
| `per_page` | integer | No | Results per page (default: 20, max: 200) |
| `callback` | string | No | JSONP callback function name |
**Example Request**:
```bash
curl -X GET "https://api.lowcodeapi.com/pixabay/api?q=nature&image_type=photo&per_page=50&api_token=YOUR_API_TOKEN"
```
**Official Documentation**: [Search Images](https://pixabay.com/api/docs/)
---
#### Search Videos
**Method**: `GET` | **LowCodeAPI Path**: `/api/videos`
**Full URL**:
```
https://api.lowcodeapi.com/pixabay/api/videos?q={q}&api_token={api_token}
```
**Description**: Search for videos using a query string.
**Query Parameters**:
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `q` | string | No | URL-encoded search term |
| `lang` | string | No | Language code (same as image search) |
| `video_type` | enum | No - Filter by type: all, film, animation |
| `orientation` | string | No | Filter by orientation: horizontal, vertical |
| `category` | string | No | Filter by category (same as image search) |
| `min_width` | integer | No | Minimum video width |
| `min_height` | integer | No | Minimum video height |
| `editors_choice` | boolean | No | Select videos by Editor's Choice |
| `safesearch` | boolean | No | Safesearch flag (default: true) |
| `order` | enum | No | Results order: popular, latest |
| `page` | integer | No | Page number (default: 1) |
| `per_page` | integer | No | Results per page (default: 20, max: 200) |
**Example Request**:
```bash
curl -X GET "https://api.lowcodeapi.com/pixabay/api/videos?q=ocean&video_type=film&per_page=50&api_token=YOUR_API_TOKEN"
```
**Official Documentation**: [Search Videos](https://pixabay.com/api/docs/)
---
## Usage Examples
### Example 1: Search for Nature Photos
Find high-quality nature images:
```bash
# No ID needed - searches for images
curl -X GET "https://api.lowcodeapi.com/pixabay/api?q=nature+landscape&image_type=photo&orientation=horizontal&per_page=50&api_token=YOUR_API_TOKEN"
```
### Example 2: Get Specific Images by ID
Retrieve specific images using their IDs:
```bash
# No ID needed - retrieves by ID
curl -X GET "https://api.lowcodeapi.com/pixabay/api?id=12345678,87654321&api_token=YOUR_API_TOKEN"
```
### Example 3: Search for Videos
Find video content:
```bash
# No ID needed - searches for videos
curl -X GET "https://api.lowcodeapi.com/pixabay/api/videos?q=technology&orientation=horizontal&per_page=30&api_token=YOUR_API_TOKEN"
```
## Complete Endpoint Reference
For a complete list of all 2 endpoints and their parameters, refer to:
- **OpenAPI Definition**: https://backend.lowcodeapi.com/pixabay/definition
- **Official Pixabay Documentation**: https://pixabay.com/api/docs/
## Rate Limits & Best Practices
- **Rate Limit**: 5,000 requests per hour per API key
- **Best Practices**:
- Use per_page parameter appropriately (max 200)
- Use image_type and video_type filters to narrow results
- Cache image IDs for frequently used assets
- Use safesearch=true for public-facing applications
- Implement pagination with page parameter
- Store full resolution URLs for downloaded assets
## Error Handling
All responses are wrapped in a `data` key:
```json
{
"data": {
// Actual response from Pixabay
}
}
```