{
  "openapi": "3.0.1",
  "info": {
    "title": "Pexels Scraper — Photos, Videos & Engagement Data",
    "description": "This Pexels scraper extracts photos and videos by search, curated feed, photo ID, user, collection or similar-to. Views, downloads, likes and EXIF data the official API cannot return come with every record. Incremental mode tracks what changed between scheduled runs.",
    "version": "0.1",
    "x-build-id": "GKbR8hUwgkPmkm5ei"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/blackfalcondata~pexels-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-blackfalcondata-pexels-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/blackfalcondata~pexels-scraper/runs": {
      "post": {
        "operationId": "runs-sync-blackfalcondata-pexels-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/blackfalcondata~pexels-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-blackfalcondata-pexels-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",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "🎛️ Mode",
            "enum": [
              "search",
              "curated",
              "byPhotoId",
              "byUser",
              "byCollection",
              "similar"
            ],
            "type": "string",
            "description": "Which Pexels source to scrape.",
            "default": "search"
          },
          "searchQuery": {
            "title": "🔍 Search Query",
            "type": "string",
            "description": "Keyword(s) to search for. Required in search mode unless Search URL is set."
          },
          "searchUrl": {
            "title": "🔗 Search URL",
            "type": "string",
            "description": "A full pexels.com search URL to scrape directly, instead of building one from Search Query + filters."
          },
          "mediaType": {
            "title": "🖼️ Media Type",
            "enum": [
              "photos",
              "videos"
            ],
            "type": "string",
            "description": "Search photos or videos.",
            "default": "photos"
          },
          "orientation": {
            "title": "📐 Orientation",
            "enum": [
              "landscape",
              "portrait",
              "square"
            ],
            "type": "string",
            "description": "Restrict results to this orientation."
          },
          "color": {
            "title": "🎨 Color",
            "type": "string",
            "description": "Hex colour, e.g. #ff0000. Biases results toward that hue (not an exact match). Named colours are not supported."
          },
          "peopleCount": {
            "title": "🧍 People Count",
            "type": "integer",
            "description": "Filter by the number of people shown in the media."
          },
          "peopleAge": {
            "title": "🧒 People Age",
            "type": "string",
            "description": "Filter by the age group of people shown in the media."
          },
          "minWidth": {
            "title": "↔️ Minimum Width",
            "type": "integer",
            "description": "Minimum width in pixels."
          },
          "minHeight": {
            "title": "↕️ Minimum Height",
            "type": "integer",
            "description": "Minimum height in pixels."
          },
          "minDuration": {
            "title": "⏱️ Minimum Duration (video)",
            "type": "integer",
            "description": "Minimum video duration in seconds. Only applies when Media Type is videos."
          },
          "maxDuration": {
            "title": "⏱️ Maximum Duration (video)",
            "type": "integer",
            "description": "Maximum video duration in seconds. Only applies when Media Type is videos."
          },
          "photoIds": {
            "title": "🆔 Photo IDs",
            "type": "array",
            "description": "Pexels photo/video IDs. Required in byPhotoId and similar modes (similar uses the first ID).",
            "items": {
              "type": "string"
            }
          },
          "username": {
            "title": "👤 Username",
            "type": "string",
            "description": "Pexels photographer username. Required in byUser mode."
          },
          "collectionSlug": {
            "title": "📁 Collection Slug",
            "type": "string",
            "description": "Pexels collection slug (including its numeric ID suffix, as it appears in the collection URL). Required in byCollection mode."
          },
          "maxItems": {
            "title": "💯 Max Items",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of items to return.",
            "default": 30
          },
          "includeStats": {
            "title": "📈 Include Stats & EXIF",
            "type": "boolean",
            "description": "Fetch each item's detail page for views, downloads, likes, and (photos only, ~57% fill rate) EXIF camera data. Adds one extra request per item.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy Configuration",
            "type": "object",
            "description": "A proxy is required for reliable results. The default is preconfigured — leave it as-is unless you supply your own. Proxy usage is billed to your Apify account.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "excludeEmptyFields": {
            "title": "🧹 Exclude Empty Fields",
            "type": "boolean",
            "description": "Drop null, empty-string, and empty-array fields from each record before push.",
            "default": false
          },
          "compact": {
            "title": "📦 Compact Output",
            "type": "boolean",
            "description": "Return only the core fields (id, media type, dimensions, page URL, download URLs, photographer, dates) instead of the full record. Every result is still returned — only the fields per result are reduced.",
            "default": false
          },
          "incrementalMode": {
            "title": "🔁 Incremental Mode",
            "type": "boolean",
            "description": "Only return items that are new or changed since your last run with the same State Key. Requires State Key.",
            "default": false
          },
          "stateKey": {
            "title": "🔑 State Key",
            "type": "string",
            "description": "Names the saved history used by Incremental Mode. Reuse the same key across runs to keep comparing against the same history; use different keys for different searches."
          },
          "emitUnchanged": {
            "title": "📤 Include Unchanged Items",
            "type": "boolean",
            "description": "In Incremental Mode, also return items that have not changed since the last run. On by default, so results match a normal run.",
            "default": true
          },
          "appConnector": {
            "title": "Send results to a connected app",
            "type": "string",
            "description": "Optional. Pick a connected app under Settings → API & Integrations to receive your results. Best-effort across MCP connectors as Apify expands its catalog."
          },
          "mcpIssueTeam": {
            "title": "Issue tracker team",
            "type": "string",
            "description": "Only when the connected app is an issue tracker: the team the summary issue is created under."
          },
          "telegramToken": {
            "title": "🔑 Telegram Bot Token",
            "type": "string",
            "description": "Telegram bot token from @BotFather. Required for Telegram notifications. Pairs well with incremental mode."
          },
          "telegramChatId": {
            "title": "💬 Telegram Chat / Channel ID",
            "type": "string",
            "description": "Chat ID (from @userinfobot) or channel ID (starts with -100). Required when telegramToken is set."
          },
          "discordWebhookUrl": {
            "title": "🎮 Discord Webhook URL",
            "type": "string",
            "description": "Discord channel webhook URL. Server Settings → Integrations → Webhooks → New Webhook."
          },
          "slackWebhookUrl": {
            "title": "💼 Slack Incoming Webhook URL",
            "type": "string",
            "description": "Slack incoming webhook URL. Slack App → Incoming Webhooks → Add New Webhook."
          },
          "whatsappAccessToken": {
            "title": "📱 WhatsApp Access Token",
            "type": "string",
            "description": "WhatsApp Cloud API access token from Meta Business Manager. The recipient must have messaged your business number within the last 24 hours."
          },
          "whatsappPhoneNumberId": {
            "title": "📞 WhatsApp Phone Number ID",
            "type": "string",
            "description": "WhatsApp Business phone number ID (numeric, from Meta dashboard). Required when whatsappAccessToken is set."
          },
          "whatsappTo": {
            "title": "📲 WhatsApp Recipient",
            "type": "string",
            "description": "Recipient phone number in E.164 format without + (e.g. \"33612345678\"). Recipient must have messaged your business number within the last 24 hours."
          },
          "webhookUrl": {
            "title": "🪝 Generic Webhook URL",
            "type": "string",
            "description": "Receives a JSON POST with {metadata, items} after each run. Compatible with n8n, Make, Zapier, and custom HTTP backends."
          },
          "webhookHeaders": {
            "title": "📋 Webhook Headers",
            "type": "object",
            "description": "Optional JSON object of custom HTTP headers for the webhook POST (e.g. {\"Authorization\":\"Bearer ...\"})."
          },
          "notificationLimit": {
            "title": "📊 Max Listings Per Notification",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of listings included in each notification message (1–20).",
            "default": 5
          },
          "notifyOnlyChanges": {
            "title": "🔔 Notify Only New / Updated",
            "type": "boolean",
            "description": "When incremental mode is on, send notifications only for new or updated listings. Has no effect outside incremental mode.",
            "default": false
          },
          "descriptionFormat": {
            "title": "📝 Description Format",
            "enum": [
              "all",
              "text",
              "html",
              "markdown"
            ],
            "type": "string",
            "description": "Choose which representation of the listing description to include. `all` keeps every variant; the others keep only the selected one.",
            "default": "all"
          },
          "maxResults": {
            "title": "💯 Max Results",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of listings to return per run. Set to 0 for unlimited.",
            "default": 25
          },
          "startUrls": {
            "title": "🔗 Paste / Direct URLs",
            "type": "array",
            "description": "One or more direct search or listing detail URLs to process. When set, other search filters are ignored.",
            "items": {
              "type": "string"
            }
          },
          "includeDetails": {
            "title": "📋 Include Full Listing Details",
            "type": "boolean",
            "description": "Fetch the detail page for each listing to retrieve the full description text and contact information. Increases run time and cost. Leave off for a fast, low-cost run.",
            "default": false
          },
          "query": {
            "title": "🔍 Search Term(s)",
            "type": "string",
            "description": "Listing search keywords. Enter a single term or a JSON array for multi-query runs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}