# Giphy Api (`alizarin_refrigerator-owner/giphy-api`) Actor

Access the world's largest GIF library through the official Giphy API. Search millions of GIFs and stickers, get trending content, translate text to the perfect GIF, fetch random GIFs, and search animated emoji.

- **URL**: https://apify.com/alizarin\_refrigerator-owner/giphy-api.md
- **Developed by:** [The Howlers](https://apify.com/alizarin_refrigerator-owner) (community)
- **Categories:** Social media, Developer tools, Other
- **Stats:** 22 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Giphy API - Search GIFs, Stickers, Emoji & Clips

Access the world's largest GIF library through the Giphy API. Search millions of GIFs and stickers, get trending content, translate text to the perfect GIF, fetch random GIFs, and search animated emoji. Perfect for chatbots, social media automation, and content creation.

**BYOK (Bring Your Own Key)** -- you provide your own API credentials.

***

### Before You Start

This actor requires your own API credentials to fetch real data.

***

### Quick Start

#### Run with real data

```json
{
  "task": "search_gifs",
  "limit": 25,
  "offset": 0,
  "rating": "g",
  "language": "en",
  "apiKey": "YOUR_API_KEY_HERE"
}
```

***

### Input Parameters

| Parameter | Type | Default | Required | Description |
|-----------|------|---------|----------|-------------|
| `task` | string | `"search_gifs"` | Yes\* | The operation to perform on the Giphy API |
| `query` | string | - | No | Search term or phrase for GIF/sticker search |
| `gifId` | string | - | No | Giphy GIF ID for direct lookup |
| `limit` | integer | `25` | No | Maximum number of results to return (max 50) |
| `offset` | integer | `0` | No | Results offset for pagination |
| `rating` | string | `"g"` | No | Content rating filter |
| `language` | string | `"en"` | No | Language code for regional content (e.g., en, es, fr) |
| `webhookUrl` | string | - | No | URL to receive results via webhook for automation platforms |

***

### Pricing

This actor uses **pay-per-event** billing:

| Event | Description | Price |
|-------|-------------|-------|
| API Request | Each Giphy API request processed | $0.01 |

***

### Troubleshooting

#### "API key is required"

- Add your API key in the input

#### "API error 403" or "Unauthorized"

Your API key is invalid, expired, or doesn't have access to this specific API endpoint. Double-check your key and account permissions.

#### "API error 429" or "Rate limit"

Too many requests. Wait a minute and try again, or reduce the number of items per run.

#### No results or empty dataset

Check the run log for error messages. Common causes:

- Invalid input format (check the examples above)
- API key without proper permissions
- The target data doesn't exist or is too small to track

#### How do I test without an API key?

***

**Built by John Rippy | [Actor Arsenal](https://actorarsenal.com)**

# Actor input Schema

## `task` (type: `string`):

The operation to perform on the Giphy API

## `query` (type: `string`):

Search term or phrase for GIF/sticker search

## `gifId` (type: `string`):

Giphy GIF ID for direct lookup

## `limit` (type: `integer`):

Maximum number of results to return (max 50)

## `offset` (type: `integer`):

Results offset for pagination

## `rating` (type: `string`):

Content rating filter

## `language` (type: `string`):

Language code for regional content (e.g., en, es, fr)

## `apiKey` (type: `string`):

Your Giphy API key (get free key at developers.giphy.com). Leave empty to use demo mode.

## `webhookUrl` (type: `string`):

URL to receive results via webhook for automation platforms

## `demoMode` (type: `boolean`):

Run with sample data for testing (no API calls)

## Actor input object example

```json
{
  "task": "search_gifs",
  "limit": 25,
  "offset": 0,
  "rating": "g",
  "language": "en",
  "demoMode": false
}
```

# Actor output Schema

## `results` (type: `string`):

GIFs, stickers, trending content, and emoji data

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "demoMode": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("alizarin_refrigerator-owner/giphy-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "demoMode": False }

# Run the Actor and wait for it to finish
run = client.actor("alizarin_refrigerator-owner/giphy-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "demoMode": false
}' |
apify call alizarin_refrigerator-owner/giphy-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,alizarin_refrigerator-owner/giphy-api"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/3PFNu6hJOp7mDZoIJ/builds/1fBem8Y5EZ73FtBzY/openapi.json
