# Discord Server Scraper — Discovery & Invite Check (`scrapingmonkey/discord-server-scraper`) Actor

Discover public Discord servers by keyword or category, enrich server details, validate invite links, and collect public widget presence, channels, and sticker packs—no Discord token required.

- **URL**: https://apify.com/scrapingmonkey/discord-server-scraper.md
- **Developed by:** [ScrapingMonkey](https://apify.com/scrapingmonkey) (community)
- **Categories:** Automation, Lead generation, Social media
- **Stats:** 2 total users, 1 monthly users, 50.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 server results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Discord Server Scraper - Server Search, Invites, Widgets and Stickers

Discover public Discord servers and collect directory listings, invite details, audience estimates, public widgets, channels, online member samples, and sticker packs.

- Search Discord's public server directory by multiple keywords or browse supported public categories
- Extract server names, descriptions, categories, keywords, features, locale, assets, and directory rank
- Resolve public invite codes and URLs with destination, validity, expiry, channel, inviter, and event data when available
- Collect enabled public widgets with channel lists, online member samples, and presence counts
- Retrieve public sticker-pack names, sticker metadata, and SKU identifiers
- Monitor directory results and save only new or changed public servers on scheduled runs
- No Discord account, bot token, cookies, browser, or user-supplied proxy is required; requests use the built-in Apify Residential Proxy
- Export results to JSON, CSV, Excel, XML, RSS, or access them through the Apify API

### What can you do with this Actor?

| Mode / action | Input | Output | Best for |
| --- | --- | --- | --- |
| `searchServers` | One or more directory search terms | Ranked public `server` rows | Community discovery, market maps, and lead research |
| `browseCategory` | Public Discord directory categories | Category-ranked `server` rows | Category research and competitive discovery |
| `serverDetails` | Public directory server URLs | Enriched `server` rows | Server metadata and audience-size analysis |
| `resolveInvites` | Public invite codes or URLs | Validated `invite` rows | Invite health checks and destination enrichment |
| `widget` | Guild IDs with public widgets enabled | `widget` rows with public channels and online member samples | Public presence and activity monitoring |
| `stickerPacks` | No target beyond the selected mode | Public `stickerPack` rows | Sticker metadata and asset cataloging |
| `auto` | Mixed public server-directory and invite URLs | `server` or `invite` rows selected from each URL | Batch processing mixed known targets |
| `monitor` | Public directory search terms, optional categories, and a stable `monitorKey` | Only new or new-and-changed `server` rows | Scheduled directory monitoring |

Choose one mode per run. Search and category modes can enrich discovered servers with public invite and widget data without creating hidden result tables.

### Quick start

1. Open the Actor and click **Try for free**.
2. Keep **Search Servers** selected or choose another workflow.
3. Enter a keyword, category, server URL, invite, or guild ID and set the result limit.
4. Click **Start**.
5. Preview the single **Results** table or download it in your preferred format.

The default input searches the public directory for `artificial intelligence` and is ready to run.

### Input examples

#### Search public servers

```json
{
  "mode": "searchServers",
  "searchTerms": [
    "artificial intelligence",
    "data science"
  ],
  "maxItems": 50,
  "country": "US"
}
```

#### Browse a category

```json
{
  "mode": "browseCategory",
  "categories": [
    "gaming"
  ],
  "maxItems": 100,
  "country": "US"
}
```

#### Resolve invites

```json
{
  "mode": "resolveInvites",
  "inviteCodes": [
    "discord-developers"
  ],
  "country": "US"
}
```

#### Public widget

```json
{
  "mode": "widget",
  "guildIds": [
    "613425648685547541"
  ],
  "country": "US"
}
```

#### Server details

```json
{
  "mode": "serverDetails",
  "startUrls": [
    "https://discord.com/servers/python"
  ],
  "includeInviteEnrichment": true,
  "includeWidget": true,
  "country": "US"
}
```

#### Public sticker packs

```json
{
  "mode": "stickerPacks",
  "maxItems": 50,
  "country": "US"
}
```

#### Auto-detect public URLs

```json
{
  "mode": "auto",
  "startUrls": [
    "https://discord.com/servers/python",
    "https://discord.gg/discord-developers"
  ],
  "country": "US"
}
```

#### Monitor public directory results

```json
{
  "mode": "monitor",
  "searchTerms": [
    "artificial intelligence"
  ],
  "maxItems": 50,
  "monitorMode": "newAndChanged",
  "monitorKey": "discord-ai-daily",
  "country": "US"
}
```

`maxItems` limits retained directory or sticker-pack rows per input target. Invite, widget, and server-detail inputs normally produce one primary row each.

### Complete output examples

Every result row contains exactly 51 top-level fields. The same complete key set makes mixed result types predictable in JSON exports and keeps every field visible in the single Results view.

#### Complete `server` row — 51 top-level fields

```json
{
  "recordType": "server",
  "sourceMode": "searchServers",
  "sourceTarget": "example-target",
  "sourceUrl": "https://example.com/public-result",
  "sourceEndpoints": [],
  "guildId": "example-id",
  "serverName": "Example public record",
  "description": "Example public content",
  "serverUrl": "https://example.com/public-result",
  "directoryPosition": 0,
  "searchTerm": null,
  "category": null,
  "categories": [],
  "keywords": [],
  "preferredLocale": null,
  "features": [],
  "memberCount": 0,
  "onlineCount": 0,
  "premiumSubscriptionCount": 0,
  "boostLevel": 0,
  "verificationLevel": 0,
  "nsfw": false,
  "vanityUrlCode": null,
  "inviteCode": null,
  "inviteUrl": "https://example.com/public-result",
  "inviteValid": false,
  "inviteExpiresAt": "2026-08-13T12:00:00Z",
  "inviteTemporary": false,
  "channelId": "example-id",
  "channelName": null,
  "channelType": 0,
  "inviter": {},
  "scheduledEvent": {},
  "iconUrl": "https://cdn.example.com/image.jpg",
  "bannerUrl": "https://cdn.example.com/image.jpg",
  "splashUrl": "https://cdn.example.com/image.jpg",
  "widgetEnabled": false,
  "widgetInstantInvite": "https://example.com/public-result",
  "widgetChannels": [],
  "widgetMembers": [],
  "widgetPresenceCount": 0,
  "stickerPackId": "example-id",
  "stickerPackName": "Example public record",
  "stickers": [],
  "skuId": "example-id",
  "isPartial": false,
  "monitorStatus": null,
  "changedFields": [],
  "previousCapturedAt": "2026-08-13T12:00:00Z",
  "capturedAt": "2026-08-13T12:00:00Z",
  "raw": {}
}
```

#### Complete `invite` row — 51 top-level fields

```json
{
  "recordType": "invite",
  "sourceMode": "resolveInvites",
  "sourceTarget": "example-target",
  "sourceUrl": "https://example.com/public-result",
  "sourceEndpoints": [],
  "guildId": "example-id",
  "serverName": "Example public record",
  "description": "Example public content",
  "serverUrl": "https://example.com/public-result",
  "directoryPosition": 0,
  "searchTerm": null,
  "category": null,
  "categories": [],
  "keywords": [],
  "preferredLocale": null,
  "features": [],
  "memberCount": 0,
  "onlineCount": 0,
  "premiumSubscriptionCount": 0,
  "boostLevel": 0,
  "verificationLevel": 0,
  "nsfw": false,
  "vanityUrlCode": null,
  "inviteCode": null,
  "inviteUrl": "https://example.com/public-result",
  "inviteValid": false,
  "inviteExpiresAt": "2026-08-13T12:00:00Z",
  "inviteTemporary": false,
  "channelId": "example-id",
  "channelName": null,
  "channelType": 0,
  "inviter": {},
  "scheduledEvent": {},
  "iconUrl": "https://cdn.example.com/image.jpg",
  "bannerUrl": "https://cdn.example.com/image.jpg",
  "splashUrl": "https://cdn.example.com/image.jpg",
  "widgetEnabled": false,
  "widgetInstantInvite": "https://example.com/public-result",
  "widgetChannels": [],
  "widgetMembers": [],
  "widgetPresenceCount": 0,
  "stickerPackId": "example-id",
  "stickerPackName": "Example public record",
  "stickers": [],
  "skuId": "example-id",
  "isPartial": false,
  "monitorStatus": null,
  "changedFields": [],
  "previousCapturedAt": "2026-08-13T12:00:00Z",
  "capturedAt": "2026-08-13T12:00:00Z",
  "raw": {}
}
```

#### Complete `widget` row — 51 top-level fields

```json
{
  "recordType": "widget",
  "sourceMode": "widget",
  "sourceTarget": "example-target",
  "sourceUrl": "https://example.com/public-result",
  "sourceEndpoints": [],
  "guildId": "example-id",
  "serverName": "Example public record",
  "description": "Example public content",
  "serverUrl": "https://example.com/public-result",
  "directoryPosition": 0,
  "searchTerm": null,
  "category": null,
  "categories": [],
  "keywords": [],
  "preferredLocale": null,
  "features": [],
  "memberCount": 0,
  "onlineCount": 0,
  "premiumSubscriptionCount": 0,
  "boostLevel": 0,
  "verificationLevel": 0,
  "nsfw": false,
  "vanityUrlCode": null,
  "inviteCode": null,
  "inviteUrl": "https://example.com/public-result",
  "inviteValid": false,
  "inviteExpiresAt": "2026-08-13T12:00:00Z",
  "inviteTemporary": false,
  "channelId": "example-id",
  "channelName": null,
  "channelType": 0,
  "inviter": {},
  "scheduledEvent": {},
  "iconUrl": "https://cdn.example.com/image.jpg",
  "bannerUrl": "https://cdn.example.com/image.jpg",
  "splashUrl": "https://cdn.example.com/image.jpg",
  "widgetEnabled": false,
  "widgetInstantInvite": "https://example.com/public-result",
  "widgetChannels": [],
  "widgetMembers": [],
  "widgetPresenceCount": 0,
  "stickerPackId": "example-id",
  "stickerPackName": "Example public record",
  "stickers": [],
  "skuId": "example-id",
  "isPartial": false,
  "monitorStatus": null,
  "changedFields": [],
  "previousCapturedAt": "2026-08-13T12:00:00Z",
  "capturedAt": "2026-08-13T12:00:00Z",
  "raw": {}
}
```

#### Complete `stickerPack` row — 51 top-level fields

```json
{
  "recordType": "stickerPack",
  "sourceMode": "stickerPacks",
  "sourceTarget": "example-target",
  "sourceUrl": "https://example.com/public-result",
  "sourceEndpoints": [],
  "guildId": "example-id",
  "serverName": "Example public record",
  "description": "Example public content",
  "serverUrl": "https://example.com/public-result",
  "directoryPosition": 0,
  "searchTerm": null,
  "category": null,
  "categories": [],
  "keywords": [],
  "preferredLocale": null,
  "features": [],
  "memberCount": 0,
  "onlineCount": 0,
  "premiumSubscriptionCount": 0,
  "boostLevel": 0,
  "verificationLevel": 0,
  "nsfw": false,
  "vanityUrlCode": null,
  "inviteCode": null,
  "inviteUrl": "https://example.com/public-result",
  "inviteValid": false,
  "inviteExpiresAt": "2026-08-13T12:00:00Z",
  "inviteTemporary": false,
  "channelId": "example-id",
  "channelName": null,
  "channelType": 0,
  "inviter": {},
  "scheduledEvent": {},
  "iconUrl": "https://cdn.example.com/image.jpg",
  "bannerUrl": "https://cdn.example.com/image.jpg",
  "splashUrl": "https://cdn.example.com/image.jpg",
  "widgetEnabled": false,
  "widgetInstantInvite": "https://example.com/public-result",
  "widgetChannels": [],
  "widgetMembers": [],
  "widgetPresenceCount": 0,
  "stickerPackId": "example-id",
  "stickerPackName": "Example public record",
  "stickers": [],
  "skuId": "example-id",
  "isPartial": false,
  "monitorStatus": null,
  "changedFields": [],
  "previousCapturedAt": "2026-08-13T12:00:00Z",
  "capturedAt": "2026-08-13T12:00:00Z",
  "raw": {}
}
```

### What data can you extract?

| Category | Fields |
| --- | --- |
| Source and capture | `recordType`, `sourceMode`, `sourceTarget`, `sourceUrl`, `sourceEndpoints`, `capturedAt` |
| Server identity | `guildId`, `serverName`, `description`, `serverUrl`, `directoryPosition` |
| Discovery metadata | `searchTerm`, `category`, `categories`, `keywords`, `preferredLocale`, `features` |
| Audience and status | `memberCount`, `onlineCount`, `premiumSubscriptionCount`, `boostLevel`, `verificationLevel`, `nsfw` |
| Invite data | `vanityUrlCode`, `inviteCode`, `inviteUrl`, `inviteValid`, `inviteExpiresAt`, `inviteTemporary` |
| Channel and event data | `channelId`, `channelName`, `channelType`, `inviter`, `scheduledEvent` |
| Visual assets | `iconUrl`, `bannerUrl`, `splashUrl` |
| Public widget | `widgetEnabled`, `widgetInstantInvite`, `widgetChannels`, `widgetMembers`, `widgetPresenceCount` |
| Sticker packs | `stickerPackId`, `stickerPackName`, `stickers`, `skuId` |
| Monitoring and diagnostics | `isPartial`, `monitorStatus`, `changedFields`, `previousCapturedAt`, `raw` |

Nested fields such as `inviter`, `scheduledEvent`, `widgetChannels`, `widgetMembers`, `stickers`, and optional `raw` retain Discord's public endpoint structure after sensitive cookie, authorization, token, and signature keys are removed. Their nested keys are source-controlled and can change; the 51 top-level keys above are fixed by the Actor.

### Input parameters

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `mode` | `string` | No | `"searchServers"` | `auto`, `searchServers`, `browseCategory`, `serverDetails`, `resolveInvites`, `widget`, `stickerPacks`, or `monitor`. |
| `searchTerms` | `string[]` | In `searchServers` | `["artificial intelligence"]` | Keywords for Discord's public server directory. |
| `categories` | `string[]` | In `browseCategory` | `[]` | Public directory category slugs. |
| `startUrls` | `string[]` | In `auto` / `serverDetails` | `[]` | Public directory server pages or invite URLs. |
| `inviteCodes` | `string[]` | In `resolveInvites` | `[]` | Public invite codes or full invite URLs. |
| `guildIds` | `string[]` | In `widget` | `[]` | Guild IDs whose public widget is enabled. |
| `maxItems` | `integer` | No | `50` | Maximum retained directory or sticker rows per input target, from 1 to 15,000. |
| `maxPages` | `integer` | No | `20` | Maximum directory pages per search or category, from 1 to 250. |
| `includeInviteEnrichment` | `boolean` | No | `true` | Resolve a discovered public invite code when available. |
| `includeWidget` | `boolean` | No | `true` | Request public widget channels and online member samples when a guild ID is known. |
| `maxConcurrency` | `integer` | No | `5` | Concurrent public targets, from 1 to 20. |
| `country` | `string` | No | `"US"` | Two-letter ISO country used for the internal residential proxy region. |
| `includeRaw` | `boolean` | No | `false` | Include the redacted public source object; increases dataset size. |
| `monitorMode` | `string` | No | `"off"` | `off`, `onlyNew`, or `newAndChanged`. |
| `monitorKey` | `string` | With monitoring | `"default"` | Stable comparison-state namespace for recurring runs. |
| `maxSessionRotations` | `integer` | No | `3` | Fresh residential sessions tried after blocks, from 1 to 6. |
| `requestTimeoutSecs` | `integer` | No | `45` | Per-request timeout in seconds, from 15 to 120. |

### Pay-per-event result types

| Event | Charged when |
| --- | --- |
| `server-result` | One `server` row is accepted by the Dataset. |
| `invite-result` | One `invite` row is accepted by the Dataset. |
| `widget-result` | One `widget` row is accepted by the Dataset. |
| `sticker-pack-result` | One `stickerPack` row is accepted by the Dataset. |

The Actor does not emit a paid error event. Failed targets are counted by category in `RUN_SUMMARY`; successful targets continue. Actual event prices are shown on the Actor's Pricing tab.

### Use cases

#### Discover communities and market segments

Search or browse Discord's public server directory to build ranked datasets by keyword or category.

#### Validate invites and public server health

Resolve public invite destinations, expiry metadata, audience estimates, widget availability, and public presence counts.

#### Build lead and research pipelines

Export normalized server records to Google Sheets, Airtable, Make, Zapier, n8n, Airbyte, webhooks, or a data warehouse for qualification and analysis.

#### Monitor public changes

Schedule recurring runs with a stable `monitorKey` to retain only new or changed public server, invite, and widget records.

### Performance and cost

Direct HTTP generally uses substantially less memory and bandwidth than launching a browser, but source response size, retries, optional enrichment, raw objects, and pagination determine actual cost. Start with a small limit, inspect the Dataset and RUN\_SUMMARY, then scale. Lower concurrency is usually more reliable on stricter public sites.

### API usage

Replace `YOUR_USERNAME` with the publishing Apify username after publication:

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/YOUR_USERNAME~discord-server-scraper/runs?token=APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "searchServers",
    "searchTerms": ["artificial intelligence"],
    "maxItems": 50,
    "country": "US"
  }'
```

The request body is the same JSON used in Apify Console. Read results from the run's default Dataset or use the output link that opens `view=overview`.

### Best for / not for

**Best for:** public server discovery, directory research, invite validation, public widget monitoring, and sticker-pack metadata.

**Not for:** messages, threads, DMs, private servers or channels, complete member lists, guild administration, or any workflow requiring a bot or user token.

### Limits and good to know

Discord messages, complete member enumeration, private servers, private channels, and account-only APIs require authentication and are deliberately excluded. Widget member data is a public online sample, not a full membership list.

A missing public value is returned as `null` or an empty array. One failed input does not create a frightening error row in Results. If every input fails, the run fails after writing diagnostic counts to RUN\_SUMMARY.

### Frequently asked questions

#### What input should I provide?

Use search terms, directory category slugs, public directory URLs, invite codes or URLs, or guild IDs with enabled public widgets, depending on the selected mode.

#### How many results can I extract?

`maxItems` accepts 1-15,000 per search, category, or sticker target and `maxPages` accepts 1-250. Discord directory availability and pagination can return fewer rows.

#### Can I process multiple inputs?

Yes. Input arrays accept multiple terms, categories, URLs, invites, or guild IDs. Stable guild and invite identities are deduplicated before saving.

#### Can I schedule recurring runs?

Yes. Use Apify schedules, monitoring fields, and webhooks to deliver new or changed public records to another system.

#### Does this Actor open a browser?

No. Runtime extraction uses direct HTTP only and contains no Playwright, Selenium, Chromium, or browser installation.

#### Do I need an account or cookies?

No. The supported modes use public pages and anonymous endpoints. Cookies or authorization values from research captures are never embedded in the release.

#### Do I need to configure a proxy?

No. On Apify, the Actor creates a Residential Proxy configuration internally and does not expose proxy settings in Input. Local developers may privately point the documented test-only environment variable at a proxy file; that variable is not an Actor input and is ignored on the platform.

#### Why are some fields empty?

The single Results view covers every result type. Fields that do not apply to a row remain empty, while the complete key set is preserved in JSON.

### Responsible use

Collect only public Discord data you are permitted to process. Respect applicable law, privacy rights, platform terms, rate limits, and intellectual-property rights. This Actor is not affiliated with or endorsed by Discord.

### Support

For a reproducible issue, include the Apify run ID, mode, a non-sensitive public target, expected result, and actual result. Never send account credentials, cookies, access tokens, proxy passwords, or private content.

### Local development

For local read-only smoke tests only, `DISCORD_TEST_PROXY_FILE` may point to a private file containing one `login:password@host:port` proxy per line. The file is never read on Apify and must not be committed.

# Actor input Schema

## `mode` (type: `string`):

Choose server search, category browsing, server details, invite resolution, widgets, sticker packs, auto detection, or monitoring.

## `searchTerms` (type: `array`):

Keywords for Discord's public server directory.

## `categories` (type: `array`):

Optional public directory categories.

## `startUrls` (type: `array`):

Public directory server pages or invite URLs.

## `inviteCodes` (type: `array`):

Public invite codes or full invite URLs.

## `guildIds` (type: `array`):

Public guild IDs whose server widget is enabled.

## `maxItems` (type: `integer`):

Maximum directory or sticker records retained per input target.

## `maxPages` (type: `integer`):

Maximum directory result pages requested for each search or category.

## `includeInviteEnrichment` (type: `boolean`):

Resolve a discovered public invite code when the directory exposes one.

## `includeWidget` (type: `boolean`):

Request public widget channels and online member samples when a guild ID is known.

## `maxConcurrency` (type: `integer`):

Maximum Discord targets processed at once.

## `country` (type: `string`):

Two-letter ISO country used as the public request region.

## `includeRaw` (type: `boolean`):

Add the complete public source object after cookie, authorization, token, and signature fields are redacted. Increases dataset size.

## `monitorMode` (type: `string`):

Optionally save only new records or new and changed records between named runs.

## `monitorKey` (type: `string`):

Stable namespace for comparison state. Use a different key for independent monitors.

## `maxSessionRotations` (type: `integer`):

Maximum fresh residential proxy sessions tried after blocks, limits, or challenges.

## `requestTimeoutSecs` (type: `integer`):

Maximum time in seconds for one public HTTP request.

## Actor input object example

```json
{
  "mode": "searchServers",
  "searchTerms": [
    "artificial intelligence"
  ],
  "categories": [],
  "startUrls": [],
  "inviteCodes": [],
  "guildIds": [],
  "maxItems": 50,
  "maxPages": 20,
  "includeInviteEnrichment": true,
  "includeWidget": true,
  "maxConcurrency": 5,
  "country": "US",
  "includeRaw": false,
  "monitorMode": "off",
  "monitorKey": "default",
  "maxSessionRotations": 3,
  "requestTimeoutSecs": 45
}
```

# Actor output Schema

## `dataset` (type: `string`):

All 51 fields in one complete Results table.

## `runSummary` (type: `string`):

Request, retry, failure, byte, result, and charged-event counts.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapingmonkey/discord-server-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("scrapingmonkey/discord-server-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call scrapingmonkey/discord-server-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapingmonkey/discord-server-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/eyh69jLNMjkMoE3cG/builds/dwriVPLIAhyOShqfV/openapi.json
