{
  "openapi": "3.0.1",
  "info": {
    "title": "Facebook Games Scraper",
    "description": "Facebook Games Scraper extracts video game titles, directory urls, vanity slugs, cover poster images, live viewer counts, and total follower numbers. Features suggested and viewer-based ranking with global proxy country routing for video game market intelligence.",
    "version": "0.0",
    "x-build-id": "cnjQYS9eeKEmB3wYu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlix~facebook-games-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlix-facebook-games-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/crawlix~facebook-games-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlix-facebook-games-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/crawlix~facebook-games-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlix-facebook-games-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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Scraping Mode",
            "enum": [
              "direct_discovery",
              "username_input"
            ],
            "type": "string",
            "description": "Choose your operation mode: Direct Directory Discovery scrapes the catalog serially (using Sort by and Max Items), whereas Target Game Usernames scrapes specific games directly. All enrichment options (About, Live Streams, Videos, and Country) work across both modes.",
            "default": "direct_discovery"
          },
          "game_usernames": {
            "title": "Target Game Usernames (Targeted Mode Only)",
            "type": "array",
            "description": "List of exact Facebook game usernames (vanity slugs) or Facebook Gaming URLs to scrape (e.g., 'mobilelegends', 'garenafreefire', 'valorant', or 'https://www.facebook.com/gaming/pubgmobile/'). Applies exclusively when Scraping Mode is set to 'Target Game Usernames'. Make sure to enter the exact username correctly as seen in the URL bar on Facebook Gaming (facebook.com/gaming/<username>/), otherwise the platform will not be able to find the game.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sort_by": {
            "title": "Sort by (Direct Discovery Mode Only)",
            "enum": [
              "suggested",
              "viewers"
            ],
            "type": "string",
            "description": "Order of game directory results when using Direct Directory Discovery mode. Applies exclusively to Direct Directory Discovery. Suggested ranks by Facebook's default discovery algorithm. Viewers ranks video games by highest active concurrent viewer count first. (Ignored in Target Game Usernames mode as specific titles are scraped directly).",
            "default": "suggested"
          },
          "max_items": {
            "title": "Max Items to Scrape (Direct Discovery Mode Only)",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of video games to collect from the directory. Applies exclusively to Direct Directory Discovery mode. Free Apify users collect up to 50 items per run; paying users enjoy unlimited collection capacity. (Ignored in Target Game Usernames mode as the collection count is determined by your target usernames list).",
            "default": 10
          },
          "scrape_game_page_about": {
            "title": "Scrape Game Page About (Both Modes)",
            "type": "boolean",
            "description": "Works for both Direct Discovery and Target Game Usernames modes. Completely free with no extra event charge. When enabled, visits the official Facebook page for each video game to collect complete page details such as page profile, follower count, like count, category, verified status, intro bio, and cover photo.",
            "default": false
          },
          "scrape_all_live": {
            "title": "Scrape All Live for a Game (Both Modes) ($)",
            "type": "boolean",
            "description": "Works for both Direct Discovery and Target Game Usernames modes. When enabled, visits the dedicated Live tab for each game to collect active real-time live broadcasts, including streamer info, concurrent viewer count, and direct stream URLs. Billed per live stream broadcast successfully collected and saved to the dataset (see the Apify Pricing tab for details). Includes continuous multi-batch collection.",
            "default": false
          },
          "live_sort_by": {
            "title": "Live Streams Sort Order (Both Modes)",
            "enum": [
              "viewers",
              "suggested"
            ],
            "type": "string",
            "description": "Ranking order of live streams on the game's dedicated Live tab: Viewers sorts active streams by highest concurrent spectator volume first (default); Suggested uses Facebook's discovery relevance algorithm.",
            "default": "viewers"
          },
          "max_live_streams_per_game": {
            "title": "Max Live Streams Per Game (Both Modes)",
            "minimum": 1,
            "maximum": 150,
            "type": "integer",
            "description": "Works for both Direct Discovery and Target Game Usernames modes. Maximum number of active live broadcasts to collect per game from the Live tab (applies when Scrape All Live for a Game is enabled). Facebook hard caps live stream feeds at 150 broadcasts.",
            "default": 10
          },
          "scrape_all_videos": {
            "title": "Scrape All Videos for a Game (Both Modes) ($)",
            "type": "boolean",
            "description": "Works for both Direct Discovery and Target Game Usernames modes. When enabled, visits the dedicated Videos tab for each game to collect video recordings, replays, and video broadcasts, including title, creator name, video URL, and cover thumbnail. Billed per video successfully collected and saved to the dataset (see the Apify Pricing tab for details). Includes continuous multi-batch collection.",
            "default": false
          },
          "max_videos_per_game": {
            "title": "Max Videos Per Game (Both Modes)",
            "minimum": 1,
            "maximum": 150,
            "type": "integer",
            "description": "Works for both Direct Discovery and Target Game Usernames modes. Maximum number of video recordings to collect per game from the Videos tab (applies when Scrape All Videos for a Game is enabled). Facebook hard caps video feeds at 150 videos.",
            "default": 10
          },
          "proxyCountry": {
            "title": "Connection Country (Both Modes)",
            "enum": [
              "US",
              "GB",
              "AU",
              "CA",
              "DE",
              "FR",
              "NL",
              "IT",
              "ES",
              "SE",
              "NO",
              "DK",
              "FI",
              "BE",
              "AT",
              "CH",
              "IE",
              "PL",
              "PT",
              "CZ",
              "HU",
              "RO",
              "GR",
              "JP",
              "KR",
              "SG",
              "IN",
              "BR",
              "MX",
              "AR",
              "TR",
              "BD",
              "PK",
              "PH",
              "ID",
              "TH",
              "VN",
              "MY",
              "TW",
              "HK",
              "AE",
              "SA",
              "EG",
              "ZA",
              "NG",
              "KE",
              "NZ"
            ],
            "type": "string",
            "description": "Works for both Direct Discovery and Target Game Usernames modes. The country your run connects from. Pick the location closest to the target audience. If a country is not available, the run connects from the United States automatically.",
            "default": "US"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}