{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Hashtag Search Scraper with Business Contact Leads",
    "description": "Facebook Hashtag Search Scraper: Find posts by hashtag and extract business pages, usernames, captions, URLs, engagement data, and publicly available contact details. Build targeted business lead lists for prospecting, market research, competitor analysis, and social media intelligence.",
    "version": "0.2",
    "x-build-id": "Y8fjW1lSmQnZ1PwJQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapier~facebook-hashtag-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapier-facebook-hashtag-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/scrapier~facebook-hashtag-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapier-facebook-hashtag-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/scrapier~facebook-hashtag-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapier-facebook-hashtag-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": [
          "searchQueries"
        ],
        "properties": {
          "searchQueries": {
            "title": "🏷️ Hashtags to mine for leads (bulk)",
            "type": "array",
            "description": "One or more **hashtags** (e.g. `realestate`, `plumber`, `coffeeshop`) or full Facebook hashtag URLs (e.g. `https://www.facebook.com/hashtag/realestate`). Every matching post's author becomes a potential lead. Bulk input supported.",
            "default": [
              "football"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "📦 Max posts (leads) per hashtag",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum posts to collect **per hashtag** — each is enriched into one lead row. Example: `25` scans up to 25 posts per hashtag. Facebook caps a hashtag feed at roughly 200 posts. Default is 10.",
            "default": 10
          },
          "extractContacts": {
            "title": "🏢 Enrich authors with business contacts",
            "type": "boolean",
            "description": "When on, each post author's public Facebook Page is fetched (logged-out) and parsed for email, phone, website, Instagram, category and audience counts into `authorContact`. Turn off for a plain hashtag-post scrape. Default is on.",
            "default": true
          },
          "businessPagesOnly": {
            "title": "🏪 Keep only business Pages",
            "type": "boolean",
            "description": "Only output posts whose author is a business Page (`isBusinessPage = true`) — personal profiles are skipped (and not charged). Off = keep every author. Default is off.",
            "default": false
          },
          "requireContact": {
            "title": "📇 Require an email or phone",
            "type": "boolean",
            "description": "Only output leads whose Page exposes an email OR a phone number (`hasContact = true`). Off = keep authors with no public contact too. Default is off.",
            "default": false
          },
          "c_user": {
            "title": "🍪 Facebook c_user cookie",
            "type": "string",
            "description": "Your Facebook `c_user` cookie (the numeric account ID). Copy it from your browser DevTools → Application → Cookies → www.facebook.com. Needed to authenticate the hashtag search. Leave blank if you supply `fbCookie` instead."
          },
          "xs": {
            "title": "🔐 Facebook xs cookie",
            "type": "string",
            "description": "Your Facebook `xs` session cookie. Copy it from DevTools → Application → Cookies → www.facebook.com. Kept secret. Leave blank if you supply `fbCookie` instead."
          },
          "fbCookie": {
            "title": "🔑 Facebook cookie string (alternative)",
            "type": "string",
            "description": "Optional — paste your full Facebook cookie header, e.g. `c_user=1000...; xs=34%3A...`. The `c_user` and `xs` values are read from it, so you can use this instead of the two fields above. Kept secret."
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy Configuration",
            "type": "object",
            "description": "By default the actor runs **without a proxy** and auto-falls back to a datacenter then a sticky residential IP if Facebook throttles it. The same ladder is used for the logged-out contact-page lookups.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}