{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Search Scraper",
    "description": "Powerful Facebook search that scrapes and searches posts, pages, and profiles by keyword. Get detailed info like author, engagement metrics, images, videos. Ideal for research, monitoring, and analysis.",
    "version": "0.3",
    "x-build-id": "aWEJM603fP0uIcNEI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alien_force~facebook-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alien_force-facebook-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/alien_force~facebook-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-alien_force-facebook-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/alien_force~facebook-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-alien_force-facebook-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",
        "properties": {
          "cookies": {
            "title": "Cookies (not required)",
            "type": "array",
            "description": "1. Install the Cookie-Editor Chrome extension.\n2. Log in to your Facebook account.\n3. Open the Cookie-Editor extension and export cookies as JSON for facebook.com.\n4. Paste the exported cookie contents here.",
            "default": []
          },
          "search_type": {
            "title": "Search Type",
            "enum": [
              "posts",
              "pages",
              "people"
            ],
            "type": "string",
            "description": "Select what search type to work with.",
            "default": "posts"
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Provide a keyword to search in Facebook."
          },
          "filter_by_recent_posts": {
            "title": "Filter By Recent",
            "type": "boolean",
            "description": "When selected, newer posts will be fetched first. (applied only with search type 'posts')",
            "default": false
          },
          "fetch_reaction_map": {
            "title": "Fetch Reaction Map",
            "type": "boolean",
            "description": "When turned on, reaction map is fetched for each post of type `video` only. Regular post items are always fetched regardless of this setting.",
            "default": false
          },
          "follow_post_scraping": {
            "title": "Follow Post Scraping",
            "type": "boolean",
            "description": "When turned on, SEARCH posts results are followed by a per-post scrape for more reliable data. Required (and force-enabled) when `only_reels` is true.",
            "default": true
          },
          "since": {
            "title": "Fetch Posts in Time Interval",
            "enum": [
              "all_times",
              "1d",
              "7d",
              "30d"
            ],
            "type": "string",
            "description": "Filter by time interval. This attribute will override the `start_date` and `end_date` filters",
            "default": "all_times"
          },
          "start_date": {
            "title": "Start Date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Select absolute date in format YYYY-MM-DD.\nThis attribute will override the filter_by_recent_posts value"
          },
          "end_date": {
            "title": "End Date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Select absolute date in format YYYY-MM-DD.\nThis attribute will override the filter_by_recent_posts value"
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "Filter results by location for all search types (posts, pages, people). Accepts either a 10-20 digit Facebook place/page ID for an exact match, or a place name (e.g., \"New York, NY\") which will be resolved to the closest match via Facebook's place typeahead. If the name cannot be resolved, the location filter is skipped."
          },
          "only_reels": {
            "title": "Only Reels",
            "type": "boolean",
            "description": "When selected, only reels will be fetched.",
            "default": false
          },
          "results_limit": {
            "title": "Results Limit",
            "type": "integer",
            "description": "Limit number of results, minimum is 10 results",
            "default": 10
          },
          "min_wait_time_in_sec": {
            "title": "Minimum Seconds Awaited",
            "minimum": 0,
            "maximum": 2,
            "type": "integer",
            "description": "Minimum seconds to wait for each cursor.",
            "default": 1
          },
          "max_wait_time_in_sec": {
            "title": "Maximum Seconds Awaited",
            "minimum": 3,
            "maximum": 6,
            "type": "integer",
            "description": "Maximum seconds to wait for each cursor.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Configure proxies to be used by the crawler.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}