{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Search Scraper By Hashtag",
    "description": "Extract public Facebook search results fast with Facebook Search Scraper. Collect profiles, pages, groups, posts, and related data using targeted keywords. Perfect for lead generation, competitor analysis, and market research with clean, structured export options.",
    "version": "0.1",
    "x-build-id": "N0AEmawxJR4vzBIhp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/simpleapi~facebook-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-simpleapi-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/simpleapi~facebook-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-simpleapi-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/simpleapi~facebook-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-simpleapi-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": {
          "categories": {
            "title": "🏷️ Categories",
            "type": "array",
            "description": "Business types to search (Pub, Bar, Restaurant...). Combined with locations → e.g. \"Pub NYC\", \"Bar London\". Optional secondary channel — leave as-is if you only want hashtags.",
            "default": [
              "Pub"
            ],
            "items": {
              "type": "string"
            }
          },
          "locations": {
            "title": "📍 Locations",
            "type": "array",
            "description": "Where to search (NYC, London...) — paired with each category.",
            "default": [
              "NYC"
            ],
            "items": {
              "type": "string"
            }
          },
          "resultsLimit": {
            "title": "📊 Results Limit",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Max pages to scrape across all queries. Higher = more data, longer run.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "Optional. No proxy by default. Auto fallback to datacenter → residential if blocked. If you leave this off, the hashtag feed still rotates residential sessions on its own — that rotation is the only way to see more than one post per tag."
          },
          "hashtags": {
            "title": "#️⃣ Hashtags",
            "type": "array",
            "description": "Hashtags to search, with or without the leading #. Each one is read from facebook.com/hashtag/<tag> and from the web index.",
            "default": [
              "#shoplocal"
            ],
            "items": {
              "type": "string"
            }
          },
          "readHashtagFeed": {
            "title": "📰 Read the hashtag feed",
            "type": "boolean",
            "description": "Read facebook.com/hashtag/<tag> directly. This is the only channel that returns live reactions, comments, shares and the post text.",
            "default": true
          },
          "hashtagFetchesPerTag": {
            "title": "🔁 Feed fetches per hashtag",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many times to load each hashtag page, each through a fresh proxy exit. The page renders one post per load and the same exit replays the same cached post, so this is the only breadth lever. Measured on #shoplocal: 6 rotating residential sessions returned 5 distinct posts.",
            "default": 4
          },
          "alsoSearchWeb": {
            "title": "🌍 Also search the web index",
            "type": "boolean",
            "description": "Adds a second channel: `\"#tag\" site:facebook.com`. Post permalinks are converted back to their owning Page; groups, personal profiles and numeric-id profiles are filtered out.",
            "default": true
          },
          "maxPagesPerHashtag": {
            "title": "🔢 Max pages per hashtag (web channel)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Cap on how many pages the web-index channel may contribute for each hashtag.",
            "default": 20
          },
          "onlyPagesWithMatch": {
            "title": "✅ Only pages with a hashtag match",
            "type": "boolean",
            "description": "Keep only pages with hashtag evidence — a live post from the feed, or an indexed post permalink. Turn off to also keep category × location results that never used the tag. Ignored when no hashtag is supplied.",
            "default": true
          },
          "cookies": {
            "title": "🍪 Facebook cookies (not required)",
            "type": "object",
            "description": "Optional cookie jar as a JSON object, e.g. {\"c_user\": \"...\", \"xs\": \"...\"}. Everything this actor scrapes was verified logged out, so leave this empty. Provided only so the field is declared rather than silently read."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}