{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Posts Search Scraper",
    "description": "Searching Facebook by hand for brand mentions takes hours. Search public posts by keyword or hashtag in bulk: text, author, reactions breakdown, comments, shares, media and top comments, with date and engagement filters. Track new posts. No login.",
    "version": "1.0",
    "x-build-id": "eimQp5dYKJEv9MwXY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawl_craft~facebook-posts-search-Scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawl_craft-facebook-posts-search-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/crawl_craft~facebook-posts-search-Scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawl_craft-facebook-posts-search-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/crawl_craft~facebook-posts-search-Scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawl_craft-facebook-posts-search-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": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "🔗 Facebook links (bulk)",
            "minItems": 1,
            "type": "array",
            "description": "One link per line. Accepted: a Facebook search link (https://www.facebook.com/search/posts?q=coffee), a hashtag link (https://www.facebook.com/hashtag/coffee) or a direct post link. Plain keywords also work. Add or remove lines freely.",
            "items": {
              "type": "string"
            }
          },
          "queries": {
            "title": "🔍 Search keywords",
            "type": "array",
            "description": "Keywords to search, one per line. Use \"exact phrase\", -exclude and a OR b. Each keyword is a separate search.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "hashtags": {
            "title": "📌 Extra hashtags",
            "type": "array",
            "description": "Hashtags to collect posts from, without the # sign. Each hashtag is a separate search.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchType": {
            "title": "🧭 Result order",
            "enum": [
              "top",
              "latest"
            ],
            "type": "string",
            "description": "Top shows the most relevant public posts first. Latest shows the newest posts first.",
            "default": "top"
          },
          "location": {
            "title": "📍 Place name",
            "type": "string",
            "description": "Optional place name, for example Aspen. Only posts that mention it in their text or tagged location are kept.",
            "default": ""
          },
          "maxResultsPerQuery": {
            "title": "📊 Max posts per search",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Posts kept for each link, keyword or hashtag after filtering. 0 means no cap. Free plan users get up to 10 posts per run in total; paid plans have no run limit.",
            "default": 10
          },
          "maxResultsTotal": {
            "title": "🧮 Max posts in total",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop the whole run after this many posts across all searches. 0 means no cap. Free plan users are limited to 10 posts per run.",
            "default": 0
          },
          "matchMode": {
            "title": "🎯 Keyword match mode",
            "enum": [
              "all",
              "any",
              "phrase",
              "off"
            ],
            "type": "string",
            "description": "How strictly a post must match your keywords. All terms, any term, the exact phrase, or off to keep everything found.",
            "default": "all"
          },
          "startDate": {
            "title": "📅 Posted after",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(minute|min|hour|day|week|month|year)s?\\s*(ago)?$",
            "type": "string",
            "description": "Only posts on or after this date. Use YYYY-MM-DD or a relative value such as 7 days or 2 months."
          },
          "endDate": {
            "title": "⏰ Posted before",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$|^(\\d+)\\s*(minute|min|hour|day|week|month|year)s?\\s*(ago)?$",
            "type": "string",
            "description": "Only posts on or before this date (the whole day counts). Use YYYY-MM-DD or a relative value such as 1 day."
          },
          "languages": {
            "title": "🌍 Post languages",
            "type": "array",
            "description": "Keep only posts written in these languages. The language is detected from the post text. Empty means any language.",
            "items": {
              "type": "string",
              "enum": [
                "en",
                "es",
                "pt",
                "fr",
                "de",
                "it",
                "nl",
                "id",
                "tr",
                "tl",
                "ar",
                "he",
                "ru",
                "el",
                "hi",
                "bn",
                "ta",
                "th",
                "ko",
                "ja",
                "zh",
                "my",
                "km",
                "ka",
                "am"
              ],
              "enumTitles": [
                "English",
                "Spanish",
                "Portuguese",
                "French",
                "German",
                "Italian",
                "Dutch",
                "Indonesian",
                "Turkish",
                "Filipino (Tagalog)",
                "Arabic",
                "Hebrew",
                "Russian",
                "Greek",
                "Hindi",
                "Bengali",
                "Tamil",
                "Thai",
                "Korean",
                "Japanese",
                "Chinese",
                "Burmese",
                "Khmer",
                "Georgian",
                "Amharic"
              ]
            },
            "default": []
          },
          "postTypes": {
            "title": "📸 Post types",
            "type": "array",
            "description": "Keep only these kinds of post. Empty means all kinds.",
            "items": {
              "type": "string",
              "enum": [
                "text",
                "photo",
                "album",
                "video",
                "reel",
                "link",
                "share"
              ],
              "enumTitles": [
                "Text",
                "Photo",
                "Photo album",
                "Video",
                "Reel",
                "Link",
                "Shared post"
              ]
            },
            "default": []
          },
          "authorTypes": {
            "title": "👥 Author types",
            "type": "array",
            "description": "Keep only posts written by people, by pages, or both. Empty means all authors. Group posts are listed under the group field of each row.",
            "items": {
              "type": "string",
              "enum": [
                "user",
                "page"
              ],
              "enumTitles": [
                "People",
                "Pages"
              ]
            },
            "default": []
          },
          "minReactions": {
            "title": "👍 Minimum reactions",
            "minimum": 0,
            "type": "integer",
            "description": "Skip posts with fewer reactions than this.",
            "default": 0
          },
          "minComments": {
            "title": "💬 Minimum comments",
            "minimum": 0,
            "type": "integer",
            "description": "Skip posts with fewer comments than this.",
            "default": 0
          },
          "minShares": {
            "title": "🔁 Minimum shares",
            "minimum": 0,
            "type": "integer",
            "description": "Skip posts with fewer shares than this.",
            "default": 0
          },
          "excludeReshares": {
            "title": "🚫 Skip reshared posts",
            "type": "boolean",
            "description": "Leave out posts that only reshare another post.",
            "default": false
          },
          "enginePagesPerQuery": {
            "title": "🌊 Search depth",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How deeply each search looks. Higher values can find more posts and take longer.",
            "default": 3
          },
          "maxScanned": {
            "title": "🔬 Max posts checked per search",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Most posts reviewed per search before it ends, useful when your filters are very strict.",
            "default": 400
          },
          "includeTopComments": {
            "title": "💭 Include top comments",
            "type": "boolean",
            "description": "Add the comments shown with each post. They also appear in their own table.",
            "default": true
          },
          "outputFormat": {
            "title": "🧾 Row format",
            "enum": [
              "full",
              "flat"
            ],
            "type": "string",
            "description": "Full keeps nested details. Flat gives one simple value per column for spreadsheets.",
            "default": "full"
          },
          "writeCsv": {
            "title": "📄 Also save a CSV file",
            "type": "boolean",
            "description": "Save posts.csv in the run's key-value store when the run finishes.",
            "default": false
          },
          "onlyNewPosts": {
            "title": "🆕 Only new posts",
            "type": "boolean",
            "description": "Skip posts that earlier runs already returned for the same search. Useful for scheduled monitoring.",
            "default": false
          },
          "maxConcurrency": {
            "title": "⚡ Parallel runs",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many posts are processed at the same time.",
            "default": 10
          },
          "minDelay": {
            "title": "🐢 Minimum delay (seconds)",
            "minimum": 0,
            "maximum": 60,
            "type": "number",
            "description": "Shortest wait between steps.",
            "default": 1
          },
          "maxDelay": {
            "title": "🦥 Maximum delay (seconds)",
            "minimum": 0,
            "maximum": 120,
            "type": "number",
            "description": "Longest wait between steps.",
            "default": 2.5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}