{
  "openapi": "3.0.1",
  "info": {
    "title": "Giphy Scraper (keyless)",
    "description": "No API key needed. Scrape Giphy's official API: search, trending, stickers, clips, emoji, translate, random, by-id, categories. Deep pagination, direct GIF/WebP/MP4 download, optional user API key override.",
    "version": "0.1",
    "x-build-id": "zHySkN2frTO0z408P"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/subimpact~giphy-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-subimpact-giphy-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/subimpact~giphy-scraper/runs": {
      "post": {
        "operationId": "runs-sync-subimpact-giphy-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/subimpact~giphy-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-subimpact-giphy-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "trending",
              "byIds",
              "random",
              "translate",
              "categories",
              "emoji"
            ],
            "type": "string",
            "description": "Which Giphy endpoint to hit",
            "default": "search"
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Terms to search (search mode). Each term = one API call.",
            "items": {
              "type": "string"
            },
            "default": [
              "funny cat"
            ]
          },
          "gifIds": {
            "title": "GIF IDs",
            "type": "array",
            "description": "Explicit Giphy IDs for byIds mode",
            "items": {
              "type": "string"
            }
          },
          "randomTags": {
            "title": "Random tags",
            "type": "array",
            "description": "Tags for random mode",
            "items": {
              "type": "string"
            },
            "default": [
              "cat"
            ]
          },
          "translateText": {
            "title": "Translate text",
            "type": "string",
            "description": "Text for translate mode"
          },
          "limit": {
            "title": "Limit",
            "minimum": 1,
            "maximum": 150,
            "type": "integer",
            "description": "Items per term. Hard cap 150 per API.",
            "default": 50
          },
          "offset": {
            "title": "Offset",
            "minimum": 0,
            "type": "integer",
            "description": "Pagination offset",
            "default": 0
          },
          "deepPagination": {
            "title": "Deep pagination",
            "type": "boolean",
            "description": "Keep paging (offset += limit) until empty page or limit*3 pages reached",
            "default": false
          },
          "includeStickers": {
            "title": "Include stickers",
            "type": "boolean",
            "description": "Also hit /v1/stickers/search for each term",
            "default": true
          },
          "includeClips": {
            "title": "Include clips",
            "type": "boolean",
            "description": "Also hit /v1/clips/search for each term (clips have mp4_720 variants)",
            "default": false
          },
          "rating": {
            "title": "Rating",
            "enum": [
              "g",
              "pg",
              "pg-13",
              "r"
            ],
            "type": "string",
            "description": "Content rating filter.",
            "default": "g"
          },
          "lang": {
            "title": "Language",
            "type": "string",
            "description": "Language (ISO 639-1, e.g. en, es).",
            "default": "en"
          },
          "downloadMedia": {
            "title": "Download media",
            "type": "boolean",
            "description": "Download each GIF/WebP/MP4 file into the run (stored in the run's default key-value store, dataset record gets a localFilePath + kvsUrl field).",
            "default": false
          },
          "downloadFormat": {
            "title": "Download format",
            "enum": [
              "preview",
              "downsized",
              "original"
            ],
            "type": "string",
            "description": "Which image variant to download (preview=preview_gif/url small, downsized=downsized media, original=original)",
            "default": "preview"
          },
          "maxDownloadSizeMb": {
            "title": "Max download size (MB)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Skip files larger than this (check images[].size before downloading)",
            "default": 10
          },
          "apiKey": {
            "title": "Giphy API key",
            "type": "string",
            "description": "Optional user's own Giphy API key. Defaults to the embedded public web-client key (no key needed)."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}