{
  "openapi": "3.0.1",
  "info": {
    "title": "Discord Server Scraper - Members, Online & Invites",
    "description": "Discord Server Scraper — no token, no login. Paste any invite link, code, or vanity name and get full public server data: member count, who's online now, boosts, verification, features, vanity URL and icon — plus live online members and voice channels when the widget is on. Bulk, JSON or CSV.",
    "version": "0.0",
    "x-build-id": "URGWBZuYm4HFJFNzM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~discord-server-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-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/memo23~discord-server-scraper/runs": {
      "post": {
        "operationId": "runs-sync-memo23-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/memo23~discord-server-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-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": {
          "startUrls": {
            "title": "Discord invites / codes / vanity names",
            "type": "array",
            "description": "Discord invite links, invite codes, or vanity names. The invite code is taken from the last path segment of a URL, or used verbatim for a bare code.",
            "items": {
              "type": "string"
            }
          },
          "includeWidget": {
            "title": "Include widget data (online members + voice channels)",
            "type": "boolean",
            "description": "When on (default), also fetch the server's public widget.json for online members (up to 100), their status and avatar, the voice channels, and the live presence count. Servers that disabled their widget simply omit these fields — it is not an error.",
            "default": true
          },
          "searchQuery": {
            "title": "Search keyword (discovery — coming soon)",
            "type": "string",
            "description": "Reserved for an upcoming keyword-discovery mode that finds servers for you. Accepted today but ignored — the actor scrapes the invites listed above."
          },
          "maxItems": {
            "title": "Maximum servers to scrape",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on the number of servers looked up (and billed). Entries beyond this cap are skipped.",
            "default": 1000
          },
          "minDelay": {
            "title": "Minimum delay between servers (ms)",
            "minimum": 0,
            "type": "integer",
            "description": "Lower bound of the per-server pause, in milliseconds.",
            "default": 250
          },
          "maxDelay": {
            "title": "Maximum delay between servers (ms)",
            "minimum": 0,
            "type": "integer",
            "description": "Upper bound of the per-server pause, in milliseconds.",
            "default": 750
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of invites looked up in parallel.",
            "default": 10
          },
          "minConcurrency": {
            "title": "Min concurrency",
            "minimum": 1,
            "type": "integer",
            "description": "Advisory floor for concurrency (kept for parity).",
            "default": 1
          },
          "maxRequestRetries": {
            "title": "Max request retries",
            "minimum": 0,
            "type": "integer",
            "description": "How many times a Discord request is retried (transport errors and 429s) before the server is marked failed.",
            "default": 5
          },
          "proxy": {
            "title": "Proxy configuration (optional)",
            "type": "object",
            "description": "Leave empty — Discord's invite and widget endpoints have no anti-bot, so the actor runs directly with no proxy by default. Only set this if you want to route traffic through your own proxies or Apify Proxy."
          },
          "action": {
            "title": "Select action to perform",
            "enum": [
              "scrapeServers",
              "scrapeMessages",
              "scrapeChannelMembers"
            ],
            "type": "string",
            "description": "Choose `scrapeServers` (default, no token needed) to scrape public server metadata & online widget members by invite code, or choose `scrapeMessages` / `scrapeChannelMembers` to scrape a specific channel using your Discord token.",
            "default": "scrapeServers"
          },
          "token": {
            "title": "Discord Authorization Token (only for messages / channel members)",
            "type": "string",
            "description": "Your Discord user or bot Authorization token (used only when action is `scrapeMessages` or `scrapeChannelMembers`, or when a `discord.com/channels/...` URL is provided)."
          },
          "channelUrl": {
            "title": "Channel URL",
            "type": "string",
            "description": "Discord channel URL in the format `https://discord.com/channels/{guildId}/{channelId}` (or bare `{guildId}/{channelId}`)."
          },
          "scrapeMessages.channelUrl": {
            "title": "Channel URL (scrapeMessages compatibility alias)",
            "type": "string",
            "description": "Drop-in compatibility alias for `channelUrl` when scraping messages."
          },
          "scrapeChannelMembers.channelUrl": {
            "title": "Channel URL (scrapeChannelMembers compatibility alias)",
            "type": "string",
            "description": "Drop-in compatibility alias for `channelUrl` when scraping channel/server members."
          },
          "cursor": {
            "title": "Start from cursor (message ID / user ID)",
            "type": "string",
            "description": "Optional message ID (`before` cursor for messages) or user ID (`after` cursor for guild members) to resume pagination from."
          },
          "count": {
            "title": "Total number of records required (compatibility alias for maxItems)",
            "type": "integer",
            "description": "Drop-in compatibility alias for `maxItems`."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}