{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Scraper - Posts, Pages & Contacts",
    "description": "Scrape public Facebook posts and page profiles without login. Export text, dates, media, reaction and comment/share counts, followers and public business contacts to CSV, Excel or JSON. Batch up to 25 pages and 50 posts per page, or collect page details only.",
    "version": "0.1",
    "x-build-id": "frTW4kXJYmfYwvSFj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/newbs~Facebook-Channel/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-newbs-Facebook-Channel",
        "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/newbs~Facebook-Channel/runs": {
      "post": {
        "operationId": "runs-sync-newbs-Facebook-Channel",
        "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/newbs~Facebook-Channel/run-sync": {
      "post": {
        "operationId": "run-sync-newbs-Facebook-Channel",
        "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": {
          "socialName": {
            "title": "Facebook page URL or handle",
            "type": "string",
            "description": "Start with one public page, for example NASA or https://www.facebook.com/NASA/. No Facebook login is needed. The optional batch list replaces this field."
          },
          "pages": {
            "title": "Multiple pages (optional)",
            "minItems": 1,
            "maxItems": 25,
            "type": "array",
            "description": "Paste up to 25 public Facebook page handles or URLs. When filled, this list replaces the single page above. Duplicate handles and URL variants are collected once.",
            "items": {
              "type": "string"
            }
          },
          "profileOnly": {
            "title": "Page details only (skip posts)",
            "type": "boolean",
            "description": "Collect page names, followers, categories and available public business contacts. Skips post parsing and feed requests. One extracted profile is one result; the posts-per-page setting is ignored.",
            "default": false
          },
          "numberOfPosts": {
            "title": "Posts per page",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Collect up to this many public feed posts per page (1–50). Page details only below skips posts. Existing API inputs can also use 0 for profiles.",
            "default": 5
          },
          "outputMode": {
            "title": "Result format",
            "enum": [
              "pages",
              "posts"
            ],
            "type": "string",
            "description": "One row per post is easiest for spreadsheets. Page rows keep posts nested in JSON. Page details only always returns one row per page. Both formats have the same result fee.",
            "default": "pages"
          },
          "proxyMode": {
            "title": "Proxy strategy",
            "enum": [
              "auto",
              "never",
              "always"
            ],
            "type": "string",
            "description": "Auto tries direct HTTP first, then proxy recovery if needed. A transient failure permits one fresh-session retry (at most two proxy sessions). Never prevents proxy costs. Always routes Facebook requests through the configured proxy.",
            "default": "auto"
          },
          "proxyConfiguration": {
            "title": "Proxy settings (optional)",
            "type": "object",
            "description": "Auto recovery uses Apify residential proxy when settings are omitted or the automatic group list is empty. Explicit proxy groups and custom URLs are preserved. Disabling Apify proxy disables recovery unless custom URLs are supplied. Proxy usage is charged separately."
          },
          "maxConcurrency": {
            "title": "Concurrent pages",
            "minimum": 1,
            "maximum": 3,
            "type": "integer",
            "description": "Number of pages fetched concurrently. Lower this if Facebook limits requests.",
            "default": 2
          },
          "globalTimeOut": {
            "title": "Timeout per page (seconds)",
            "minimum": 15,
            "maximum": 600,
            "type": "integer",
            "description": "Budget for one page, including bounded recovery. Each HTTP request is limited to 15 seconds. For large batches, allow a sufficient Actor run timeout as well.",
            "default": 120
          },
          "debugArtifacts": {
            "title": "Save debug HTML",
            "type": "boolean",
            "description": "Save initial page HTML in the key-value store. Disabled by default to reduce storage and avoid retaining anonymous session data unnecessarily.",
            "default": 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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}