{
  "openapi": "3.0.1",
  "info": {
    "title": "Discord Scraper — Servers & Channels (All-in-One)",
    "description": "Resolve any Discord invite URL/code/vanity to full server profile or search Disboard + Top.gg by keyword. Returns member count, online count, features, verification level, premium tier, banner, channels, emojis, stickers. Auth-free. MCP-ready.",
    "version": "0.4",
    "x-build-id": "2r6TE1O0YCaWFN5q3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~discord-all-in-one-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-discord-all-in-one-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/khadinakbar~discord-all-in-one-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-discord-all-in-one-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/khadinakbar~discord-all-in-one-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-discord-all-in-one-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": "Scrape mode",
            "enum": [
              "resolve",
              "search",
              "channels",
              "emojis",
              "bulk"
            ],
            "type": "string",
            "description": "Which Discord data type to extract. 'resolve' takes invite URLs/codes/vanity slugs and returns full server profile via the public Discord Invite API (no auth, ~280k member counts confirmed). 'search' scrapes Disboard.org and Top.gg server directories by keyword or tag, then enriches each result via the Invite API. 'channels' lists channels for a server when the server's Discord widget is enabled. 'emojis' harvests custom emojis and stickers from invite previews and widget metadata. 'bulk' resolves a long list of invite URLs/codes in parallel. Defaults to 'resolve'.",
            "default": "resolve"
          },
          "inviteUrls": {
            "title": "Invite URLs / codes / vanity slugs",
            "uniqueItems": true,
            "type": "array",
            "description": "Discord invite URLs (https://discord.gg/xyz, https://discord.com/invite/xyz), bare invite codes (xyz), or vanity slugs (discord-developers). Used for modes 'resolve', 'channels', 'emojis', and 'bulk'. Example: ['discord-developers', 'https://discord.gg/python']. Ignored in 'search' mode. NOT a list of server IDs — Discord blocks unauth lookups by server ID alone; use the vanity slug or any active invite code instead.",
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Search keyword or tag",
            "type": "string",
            "description": "Free-text keyword or tag used to query Disboard and Top.gg server directories. Examples: 'anime', 'crypto', 'ai art', 'minecraft'. Disboard treats single words as tags (disboard.org/servers/tag/<query>) and multi-word as keyword search. Used only in 'search' mode. Defaults to 'crypto'. NOT a server name lookup — for a specific server, use 'resolve' mode with its invite URL.",
            "default": "crypto"
          },
          "searchSources": {
            "title": "Directory sources to query",
            "uniqueItems": true,
            "type": "array",
            "description": "Which third-party Discord server directories to scrape in 'search' mode. Top.gg (curated, ~100 servers per query, JS-rendered, very reliable) is enabled by default. Disboard.org (4M+ servers, tag-indexed) is supported but currently blocked by Cloudflare Enterprise Bot Management — enable it at your own risk, expect 0-results outcomes until v0.3 ships Smart Browser bypass. Ignored outside 'search' mode.",
            "items": {
              "type": "string",
              "enum": [
                "disboard",
                "topgg"
              ],
              "enumTitles": [
                "Disboard.org (4M+ servers, tag-indexed)",
                "Top.gg (curated, member-count sorted)"
              ]
            },
            "default": [
              "topgg"
            ]
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Upper bound on total servers returned. Each Discord server costs one 'server-resolved' event regardless of source. Keep this small for first runs to verify output shape before scaling up. Applies to 'search' (caps directory results) and 'bulk' (caps the inviteUrls list size). Defaults to 100. Max 10000.",
            "default": 100
          },
          "enrichWithInviteApi": {
            "title": "Enrich directory results via Invite API",
            "type": "boolean",
            "description": "When true (default), every server discovered via 'search' mode is also resolved through the Discord Invite API for accurate live member counts, online counts, features list, and premium tier. Adds reliability but doubles request count. Disable only when you want raw directory listings without per-server enrichment.",
            "default": true
          },
          "includeChannels": {
            "title": "Include channel list (when widget enabled)",
            "type": "boolean",
            "description": "When true, attempts to fetch each server's channel list via the public Discord Widget API. Returns nothing for servers with widget disabled (Discord's default — only ~10% of public servers enable it). Adds one extra request per server. Defaults to false.",
            "default": false
          },
          "includeEmojisStickers": {
            "title": "Include custom emojis and stickers (best-effort)",
            "type": "boolean",
            "description": "When true, attempts to extract custom emojis and stickers via Discord's guild-preview endpoint. Best-effort: Discord requires authentication on this endpoint for most servers, so the field will typically be an empty array. Reliable emoji/sticker extraction requires a bot token (planned for a future v0.2 release). Defaults to false.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy settings. Residential proxies are recommended for directory scraping (Disboard is Cloudflare-protected). Leave default unless you have a specific reason to override.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}