{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Photos Scraper - Pages, Albums, Tagged & Group Photos",
    "description": "Scrape every public photo of a Facebook Page, profile, album or group: full-size image URL, size, alt text and link. Optional details: upload date, caption, reactions, comments, shares and tags. Date window, album list, monitor mode for new photos. $0.90 per 1,000 photos. No login or cookies.",
    "version": "0.1",
    "x-build-id": "Rx1ncDBM2eF5nRINk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/topapi~facebook-photos-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-topapi-facebook-photos-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/topapi~facebook-photos-scraper/runs": {
      "post": {
        "operationId": "runs-sync-topapi-facebook-photos-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/topapi~facebook-photos-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-topapi-facebook-photos-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": {
          "startUrls": {
            "title": "🔗 Facebook URLs",
            "type": "array",
            "description": "Public Facebook addresses: a Page or profile (https://www.facebook.com/humansofnewyork, profile.php?id=…), an album (/media/set/?set=a.…), a group (/groups/…) or a photo (/photo/?fbid=…).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "pageNames": {
            "title": "👤 Page usernames or ids",
            "type": "array",
            "description": "Usernames or numeric ids instead of URLs, e.g. \"NASA\", \"humansofnewyork\" or \"100044561550831\". Mixed with the URLs above.",
            "items": {
              "type": "string"
            }
          },
          "photoType": {
            "title": "🖼️ Which photos",
            "enum": [
              "photos_by",
              "photos_of",
              "both"
            ],
            "type": "string",
            "description": "The Page's own photos, the photos others tagged it in, or both. Albums, groups and photo links ignore this setting.",
            "default": "photos_by"
          },
          "onlyPhotosNewerThan": {
            "title": "📅 Uploaded on or after",
            "type": "string",
            "description": "Keep photos uploaded on or after this date: absolute (2026-01-01) or relative (30 days, 6 months, 1 year). Empty = no lower bound."
          },
          "onlyPhotosOlderThan": {
            "title": "📅 Uploaded before",
            "type": "string",
            "description": "Keep photos uploaded before this date, e.g. 2026-06-01 or \"1 year\". Empty = up to today."
          },
          "dateFilter": {
            "title": "🗓️ Year or month",
            "pattern": "^(\\d{4}(-(0?[1-9]|1[0-2]))?)?$",
            "type": "string",
            "description": "A year (2025) or a month (2025-06), the way Facebook's photo filter offers it. Combined with the two dates above."
          },
          "keywords": {
            "title": "🔤 Keywords",
            "type": "array",
            "description": "Keep a photo only if its alt text (and its caption, when details are on) contains one of these words, e.g. \"people\", \"text\", \"food\".",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "🚫 Exclude keywords",
            "type": "array",
            "description": "Drop a photo whose alt text (or caption, with details on) contains one of these words.",
            "items": {
              "type": "string"
            }
          },
          "minWidth": {
            "title": "📐 Minimum width (px)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Keep only photos at least this many pixels wide, e.g. 1080. 0 = any size."
          },
          "minReactions": {
            "title": "❤️ Minimum reactions",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Keep only photos with at least this many reactions. Needs \"Add photo details\"."
          },
          "includeDetails": {
            "title": "📝 Add photo details",
            "type": "boolean",
            "description": "Upload date, caption, reactions (total and by type), comment and share counts, post link, album, tagged people, owner and privacy. One extra request per photo; charged as \"Photo details\".",
            "default": false
          },
          "includeAlbums": {
            "title": "📚 List the albums",
            "type": "boolean",
            "description": "Add one row per album of each Page / profile (up to \"Albums per Page\"): title, item count, cover and link. Charged as \"Album\".",
            "default": false
          },
          "includeAlbumPhotos": {
            "title": "📂 Photos of every album",
            "type": "boolean",
            "description": "Also walk the photos inside each album (cover photos, profile pictures, named albums), with the album title on each row.",
            "default": false
          },
          "maxAlbums": {
            "title": "Albums per Page",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many albums (newest first) to list and / or walk per Page or profile.",
            "default": 10
          },
          "maxPhotosPerAlbum": {
            "title": "Photos per album",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Cap per album when walking albums. 0 = every photo of the album.",
            "default": 50
          },
          "includePageContext": {
            "title": "🏷️ Page category",
            "type": "boolean",
            "description": "Add the Page's category (e.g. \"Pizza place\") to every row. One extra page load per Page; no extra charge.",
            "default": false
          },
          "storeImages": {
            "title": "💾 Save image files",
            "type": "boolean",
            "description": "Download each image into a key-value store and add a permanent link to the row (Facebook's own image links expire after a few days). Charged as \"Image stored\".",
            "default": false
          },
          "imageStoreName": {
            "title": "Image store name",
            "type": "string",
            "description": "Named key-value store for the saved images (letters, digits and hyphens), e.g. \"nasa-photos\".",
            "default": "facebook-photos-images"
          },
          "monitorMode": {
            "title": "🆕 Only new photos",
            "type": "boolean",
            "description": "Skip photos an earlier run with the same store already delivered. A run that finds nothing new bills nothing.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Named key-value store that remembers delivered photos between runs. Use one name per schedule.",
            "default": "facebook-photos-monitor"
          },
          "resultsLimit": {
            "title": "Photos per source",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum photos from each Page, profile, album or group (newest first). 0 = all of them, up to 10,000 per source.",
            "default": 50
          },
          "maxItems": {
            "title": "Maximum rows in total",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop the whole run after this many rows across all sources. 0 = no total limit."
          },
          "compact": {
            "title": "Compact output",
            "type": "boolean",
            "description": "Core columns only (id, link, image, size, alt text, date, caption, counts) - smaller rows for AI agents and MCP.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Leave off: the run starts without a proxy and moves to the Apify datacenter proxy, then RESIDENTIAL, only if Facebook refuses it.",
            "default": {
              "useApifyProxy": false
            }
          },
          "maxConcurrency": {
            "title": "Sources at once",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "How many Pages / albums / groups are read in parallel.",
            "default": 3
          },
          "concurrentPhotos": {
            "title": "Detail requests at once",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "Photo-detail requests in flight per source when details are on.",
            "default": 8
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}