{
  "openapi": "3.0.1",
  "info": {
    "title": "FB Profile Scraper",
    "description": "Scrape data from any public FB Profile",
    "version": "0.0",
    "x-build-id": "qwKZDP0jThG8XiHtR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/devwithbobby~fb-profile-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-devwithbobby-fb-profile-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/devwithbobby~fb-profile-scraper/runs": {
      "post": {
        "operationId": "runs-sync-devwithbobby-fb-profile-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/devwithbobby~fb-profile-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-devwithbobby-fb-profile-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": [
          "profiles"
        ],
        "properties": {
          "profiles": {
            "title": "Facebook Profiles",
            "type": "string",
            "description": "Enter Facebook profiles to extract data from. You can use:\n• Just usernames: nasaearth\n• Full URLs: https://www.facebook.com/nasaearth\n• Mix both formats (one per line)\n\nExamples:\nnasaearth\nChrisBrecheensWritingAboutWriting\nhttps://www.facebook.com/UNclimatechange"
          },
          "mode": {
            "title": "Extraction Mode",
            "enum": [
              "fast",
              "balanced",
              "deep"
            ],
            "type": "string",
            "description": "Controls cost vs completeness. Fast mode prioritizes profitability and speed by using HTTP-first extraction with limited browser fallback.",
            "default": "fast"
          },
          "proxyType": {
            "title": "Proxy Type",
            "enum": [
              "BUYPROXIES94952",
              "RESIDENTIAL",
              "StaticUS3"
            ],
            "type": "string",
            "description": "Select the proxy type to use. Datacenter is cost-effective for most scraping. Use RESIDENTIAL only if you experience high block rates.",
            "default": "BUYPROXIES94952"
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Maximum number of pages to scrape in parallel. Keep low (1-3) to avoid Facebook blocks.",
            "default": 2
          },
          "maxRequestsPerMinute": {
            "title": "Max Requests Per Minute",
            "minimum": 5,
            "maximum": 30,
            "type": "integer",
            "description": "Rate limit for requests. Keep low (10-20) to avoid triggering Facebook's anti-bot measures.",
            "default": 15
          },
          "cookies": {
            "title": "Facebook Cookies (Optional)",
            "type": "string",
            "description": "Optional: Paste your Facebook cookies as JSON array for authenticated scraping. This allows access to more profile data.\n\nFormat: [{\"name\": \"c_user\", \"value\": \"...\", \"domain\": \".facebook.com\"}, ...]\n\nYou can export cookies using browser extensions like 'Cookie-Editor' or 'EditThisCookie'."
          },
          "maxProfiles": {
            "title": "Max Profiles Per Run",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Maximum number of profiles to scrape in a single run. If you provide more profiles than this limit, only the first N will be scraped. This helps control costs and runtime.",
            "default": 10
          },
          "maxRuntimePerProfileSecs": {
            "title": "Runtime Budget Per Profile (Secs)",
            "minimum": 8,
            "maximum": 90,
            "type": "integer",
            "description": "Hard runtime budget for each profile in browser fallback stage. Lower values reduce costs.",
            "default": 25
          },
          "requireAuthenticatedData": {
            "title": "Require Authenticated Data",
            "type": "boolean",
            "description": "If enabled, skip HTTP-first optimization and use browser extraction to target richer authenticated results.",
            "default": false
          },
          "enableResidentialFallback": {
            "title": "Residential Fallback On Block",
            "type": "boolean",
            "description": "If enabled, any profile blocked on the default proxy is automatically retried on residential IPs (which usually clear Facebook's login walls). You only pay the premium residential rate for the blocked profiles. Disable to cap cost at the datacenter rate.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}