{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Hashtag Search Scraper: Post Comments",
    "description": "Scrape Facebook posts by hashtag with post text, authors, timestamps, comments, reactions, shares, and engagement data. Discover relevant conversations, analyze audience interests, track content trends, monitor competitors, and extract valuable social media insights.",
    "version": "0.2",
    "x-build-id": "vK9Qu8QTFvY4Ee1p2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/api-empire~facebook-hashtag-search-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-api-empire-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/api-empire~facebook-hashtag-search-scraper/runs": {
      "post": {
        "operationId": "runs-sync-api-empire-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/api-empire~facebook-hashtag-search-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-api-empire-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 scrape",
            "type": "array",
            "description": "One or more hashtags — plain (`travel`, `#football`) or full hashtag URLs (`https://www.facebook.com/hashtag/football`). Bulk input supported. Example: `[\"streetphotography\", \"vanlife\"]`.",
            "default": [
              "football"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "📦 Posts per hashtag",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "How many posts to collect for each hashtag before moving on. Facebook's hashtag feed tops out around ~200 posts per hashtag. Comments do NOT count against this limit. Example: 25.",
            "default": 10
          },
          "includeComments": {
            "title": "💬 Fetch comments for each post",
            "type": "boolean",
            "description": "When on, every collected post is expanded into its comment thread. Each comment becomes a child row (and is also embedded in the post row's `comments` array). Turn off to scrape posts only, exactly like the base actor. Default: on.",
            "default": true
          },
          "maxComments": {
            "title": "🔢 Max comments per post",
            "minimum": 0,
            "type": "integer",
            "description": "Upper bound on top-level comments fetched per post. Set 0 for unlimited (bounded only by Facebook's own paging). Example: maxComments=30 → up to 30 comments per post. Default: 20.",
            "default": 20
          },
          "commentSort": {
            "title": "↕️ Comment order",
            "enum": [
              "mostRelevant",
              "newest",
              "chronological"
            ],
            "type": "string",
            "description": "How to order the collected comments before capping. `mostRelevant` = highest reactions + replies first; `newest` = most recent first; `chronological` = as returned by Facebook.",
            "default": "mostRelevant"
          },
          "includeReplies": {
            "title": "↩️ Include nested replies",
            "type": "boolean",
            "description": "Also fetch depth-1 replies for each comment that has them. Replies appear as their own child rows (`type` = reply) and inside each comment's `replies` array. Default: on.",
            "default": true
          },
          "maxRepliesPerComment": {
            "title": "↩️ Max replies per comment",
            "minimum": 0,
            "type": "integer",
            "description": "Upper bound on replies fetched per comment. Set 0 to skip replies entirely. Example: maxComments=10 + maxRepliesPerComment=5 → up to 10 comments and up to 50 replies. Default: 10.",
            "default": 10
          },
          "onlyCommentsNewerThan": {
            "title": "📅 Only comments newer than",
            "type": "string",
            "description": "Keep only comments (and replies) posted on/after this point. Accepts an absolute date (`2026-01-01`) or a relative window (`7 days`, `2 weeks`, `3 months`). Leave empty for no date filter."
          },
          "fbCookie": {
            "title": "🔑 Facebook cookie (c_user=..; xs=..)",
            "type": "string",
            "description": "Optional shortcut: paste the raw Facebook cookie string containing `c_user` and `xs` (copy from browser DevTools → Application → Cookies → www.facebook.com). Parsed into `c_user` + `xs` automatically. If set, it overrides the two fields below. Kept secret. 🔐"
          },
          "c_user": {
            "title": "🍪 c_user cookie",
            "type": "string",
            "description": "Facebook `c_user` cookie (your numeric user ID). Only needed if you did not fill in the combined cookie field above."
          },
          "xs": {
            "title": "🍪 xs cookie (secret)",
            "type": "string",
            "description": "Facebook `xs` cookie (URL-encoded session token). Only needed if you did not fill in the combined cookie field above. Kept secret — it grants access to your account. 🔐"
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy",
            "type": "object",
            "description": "By default the actor runs on a sticky residential IP (best fit for authenticated Facebook). On a hard block it rotates to a fresh residential session automatically.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}