{
  "openapi": "3.0.1",
  "info": {
    "title": "Discord Server Member Count Tracker - Online & Total Members",
    "description": "For community managers and growth teams: total members, online members, boosts, name, tag, icon and creation date for every Discord server you name by its invite link. One measured server: 431,725 members, 45,600 online. Monitoring returns a server only when its member count moves.",
    "version": "0.1",
    "x-build-id": "PH7eBNDbCfJzcu3b8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neverempty~discord-server-member-count-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neverempty-discord-server-member-count-tracker",
        "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/neverempty~discord-server-member-count-tracker/runs": {
      "post": {
        "operationId": "runs-sync-neverempty-discord-server-member-count-tracker",
        "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/neverempty~discord-server-member-count-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-neverempty-discord-server-member-count-tracker",
        "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": {
          "invites": {
            "title": "Discord invite links or invite codes",
            "type": "array",
            "description": "The servers to check, named by an invite: the code on its own (python), discord.gg/python, or https://discord.com/invite/python. Invite codes are case sensitive, so they are sent exactly as you type them. The same code is checked once, and if two invites lead to the same server it is returned once. Up to 1,000 per run, one request each. Server URLs such as discord.com/channels/... are not invites and are rejected with a free row. If you leave this empty and monitoring is off, the example servers python, discord-developers and nodejs are checked and every row says so in inputInvite; if monitoring is on, nothing is checked and nothing is charged.",
            "items": {
              "type": "string"
            }
          },
          "maxServers": {
            "title": "Maximum rows to return (monitoring off only)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many charged rows to return when monitoring is off: reading stops once this many servers have been read, and a free row says how many invites were not checked. **It does not limit spending in monitoring mode** - there, every server you list is checked and every change among them comes back, and the run's maximum total charge is what caps the cost. Cutting changes here would mean the servers at the end of your list never came back at all.",
            "default": 100
          },
          "monitoringMode": {
            "title": "Monitoring mode: return a server only when its member count changes",
            "type": "boolean",
            "description": "Off = every invite you listed comes back with the server's counts right now, charged per row. On = the Actor remembers each server and, on later runs, returns it only when the watched count changed, with the previous value and the difference in the row. The first run returns every server once to set the baseline. **In monitoring mode every server checked costs $0.30 per 1,000 checks, changed or not** (invites Discord returns nothing for, blocks and rate limits are free), plus the row price for the rows returned. Example: 20 servers every hour = 14,400 checks a month = $4.32. The Actor reads only as many servers as the run's maximum total charge can pay for with a check and a change row each. Counts are remembered per server, so do not put the same server in two schedules that can run at the same time.",
            "default": false
          },
          "monitorOn": {
            "title": "What counts as a change",
            "enum": [
              "member-count",
              "any-count"
            ],
            "type": "string",
            "description": "Which numbers make a server come back in monitoring mode. Total member count only is the default because Discord's answer is cached for up to 5 minutes and the online count moves almost every hour, so watching it would return nearly every server on nearly every check. Any count also returns a server when the online count or the boost count changed.",
            "default": "member-count"
          },
          "resetMonitoringState": {
            "title": "Forget what was remembered and start over",
            "type": "boolean",
            "description": "Clears every remembered count for this Actor, so the next monitoring run returns each server once again. The counts are stored per server, not per list, so this affects all your monitoring runs. **Turn it off again after that one run**: while it is on, every run starts from scratch and charges a full server row for every server instead of only the ones that changed.",
            "default": false
          },
          "useProxy": {
            "title": "Use an Apify proxy if a request does not reach Discord",
            "type": "boolean",
            "description": "Requests go out directly, which returned the invite data on every attempt measured on 2026-09-23. This option only covers the case where a request does not reach Discord at all (a connection failure): it then retries through an Apify proxy. **Blocks and bot checks are never retried from another address**, and rate limits are never worked around - the Actor waits the time Discord asks for, up to 30 seconds, and otherwise returns a free row. With this off, a connection failure is reported as a free row and no proxy is paid for.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}