{
  "openapi": "3.0.1",
  "info": {
    "title": "Discord Server & Community Scraper (All-in-One) [$2.0💰]",
    "description": "Nine Discord scrapers in one - no login, no bot token, no self-botting. Search Discord's public server directory, pull a community's social links, resolve ANY invite to live member and online counts, see who is in voice now, track server growth, and read the weekly games chart.",
    "version": "0.0",
    "x-build-id": "8ZxefAwRh4hM7a0vH"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fanndev~discord-server-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fanndev-discord-server-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/fanndev~discord-server-scraper/runs": {
      "post": {
        "operationId": "runs-sync-fanndev-discord-server-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/fanndev~discord-server-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-fanndev-discord-server-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",
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "discoverySearch",
              "discoveryCategory",
              "serverProfile",
              "inviteLookup",
              "serverWidget",
              "serverSnapshot",
              "trendingGames",
              "gameProfile",
              "botProfile"
            ],
            "type": "string",
            "description": "Which extraction to run. No Discord login, bot token or self-bot is used or accepted - everything here is served to an anonymous client, which means public server data rather than message history. Start with 'discoverySearch' to find servers by keyword, 'inviteLookup' to get live member counts for any invite you already have, or 'serverSnapshot' to track the same servers over time.",
            "default": "discoverySearch"
          },
          "searchKeywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "Keywords for discoverySearch. Each one is matched against server names, descriptions and the keywords owners tag their server with. This is the way to reach the ~45 categories that have no browsable page - Cryptocurrency, Finance, Anime & Manga, Memes, Esports and the rest - which exist only as tags on server records.",
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Discovery categories",
            "type": "array",
            "description": "Categories for discoveryCategory. Discord publishes a browsable page for exactly five: gaming, music, entertainment, science & tech, education. Anything else is a 404 on Discord's side - use searchKeywords for those.",
            "items": {
              "type": "string"
            }
          },
          "serverTargets": {
            "title": "Servers",
            "type": "array",
            "description": "Servers for serverProfile, serverWidget and serverSnapshot. Paste whatever you have: an invite link (https://discord.gg/python), a Discovery URL (https://discord.com/servers/python-267624335836053506), a bare guild ID (267624335836053506) or a bare invite code (python). The actor works out which is which. NOTE that a bare guild ID can only be resolved if the server is in Discovery or publishes a widget - an invite code always resolves.",
            "items": {
              "type": "string"
            }
          },
          "inviteCodes": {
            "title": "Invite codes or links",
            "type": "array",
            "description": "Invites for inviteLookup. Accepts discord.gg/CODE, discord.com/invite/CODE or the bare code. Vanity codes and random codes both work. This is the only mode that reaches servers which never joined Server Discovery, which is the overwhelming majority of Discord.",
            "items": {
              "type": "string"
            }
          },
          "gameTargets": {
            "title": "Games",
            "type": "array",
            "description": "Games for gameProfile. Needs the full slug-and-ID form Discord uses, e.g. valheim-1124358970618953818, or the whole URL. The trendingGames mode emits exactly this as its gameUrl field, so the two chain together.",
            "items": {
              "type": "string"
            }
          },
          "applicationIds": {
            "title": "Application / bot IDs",
            "type": "array",
            "description": "Discord application IDs for botProfile. A bare numeric ID, or any URL containing one (an OAuth2 authorize link works). Returns the app's public metadata: name, description, tags, verification and monetization status, install scopes and permissions, and its policy URLs.",
            "items": {
              "type": "string"
            }
          },
          "targets": {
            "title": "Targets (generic)",
            "type": "array",
            "description": "Optional catch-all. Whatever you put here is routed into whichever list the chosen mode needs, so this actor can be driven from another actor or a scheduler with one field no matter which mode is selected. Ignored when the mode's own list is filled in.",
            "items": {
              "type": "string"
            }
          },
          "weeksOfHistory": {
            "title": "Weeks of history",
            "minimum": 1,
            "maximum": 52,
            "type": "integer",
            "description": "For trendingGames: how many weekly charts to collect, walking backwards. 1 is the current week. The walk follows the previous-week link inside each chart rather than stepping dates by seven, because Discord answers a date it has no chart for with the CURRENT chart instead of a 404.",
            "default": 1
          },
          "startWeekDate": {
            "title": "Start week",
            "type": "string",
            "description": "For trendingGames: the week to start from, as YYYY-MM-DD, matching a weekDate Discord publishes (e.g. 2026-09-10). Leave empty for the current week. If Discord has no chart for the date you give, the actor reports that rather than silently returning the current week."
          },
          "gameCategory": {
            "title": "Game category",
            "type": "string",
            "description": "Optional genre filter for trendingGames, as the slug Discord uses on the chart: survival, fantasy, sandbox, open-world, indie, adventure, rpg, crafting and so on. Leave empty for the overall chart."
          },
          "includeWidgetMembers": {
            "title": "Include the online member list",
            "type": "boolean",
            "description": "For serverWidget: keep the per-member rows (up to 100 people currently online, their status and voice channel). Turn this off for just the counts. Discord anonymises these itself - the id field is a position in the response, never a real user ID - so they cannot be joined across runs.",
            "default": true
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Hard ceiling on dataset records for the whole run. 0 means no limit. This is the main control over cost.",
            "default": 200
          },
          "maxPagesPerTarget": {
            "title": "Max pages per keyword or category",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many result pages to walk per keyword or category in the two Discovery modes. Discord serves 12 servers per page and ignores any page size you ask for, so this is your item count divided by 12: 10 pages is up to 120 servers per keyword.",
            "default": 5
          },
          "requestDelaySecs": {
            "title": "Delay between directory requests (seconds)",
            "minimum": 0,
            "maximum": 60,
            "type": "number",
            "description": "Pacing for the server-rendered pages (/servers and /trending-games). Discord allows about six of these back to back per IP address and then answers HTTP 429 with no Retry-After header, so this is the setting that decides whether a long Discovery walk finishes. 2 seconds was measured clean over 16 consecutive requests. Lower it only behind a rotating proxy.",
            "default": 2
          },
          "apiRequestDelaySecs": {
            "title": "Delay between API requests (seconds)",
            "minimum": 0,
            "maximum": 30,
            "type": "number",
            "description": "Pacing for Discord's JSON API (invites, widgets, applications). These are far more permissive than the directory pages - a 25-request burst drew no throttling at all - so this floor is deliberately low.",
            "default": 0.4
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many times to retry a single request before giving up on it and writing a diagnostic row. Retries cover transport errors and rate limits; a 404 or a disabled widget is a final answer and is never retried.",
            "default": 4
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "Per-request timeout. Discovery listing pages are around 340 KB, so allow more than you would for a JSON endpoint on a slow proxy.",
            "default": 45
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Discord served every surface this actor uses to a plain datacentre address during testing, so a proxy is not needed to get data - unlike most scrapers. What it buys is rate-limit headroom: the directory allows only about six requests back to back per address, so rotating addresses make a long Discovery walk finish sooner. DATACENTER is enough; residential is not required.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}