A Discord bot to turn websites into LLM-ready data using the Firecrawl API.
🔥 Add Firecrawl Bot to your channel - https://firecrawl.link/discord-bot
- Scrape websites with advanced options
- Map URLs from a starting point
- Extract structured data from web pages
- Support for custom actions and parameters
- Beautiful JSON responses
- Node.js 18 or higher
- pnpm
- A Discord bot token
- A Firecrawl API key (Get yours by creating an account at Firecrawl Dashboard)
- Clone the repository:
git clone https://github.com/mendableai/firecrawl-discord-bot.git
cd firecrawl-discord-bot
- Install dependencies:
pnpm install
- Build the TypeScript code:
pnpm build
- Start the bot:
pnpm start
- For development with linting and formatting:
pnpm lint # Check for linting issues
pnpm lint:fix # Fix linting issues
pnpm format # Format code
Set your Firecrawl API key (required before using other commands).
/set-api-key key YOUR_API_KEY
Scrape a webpage with various options. Documentation
Example:
{
"url": "https://example.com",
"formats": ["markdown", "html"],
"onlyMainContent": true,
"waitFor": 1000,
"includeTags": ["article", "main"],
"excludeTags": ["nav", "footer"],
"mobile": false,
"removeBase64Images": true,
"skipTlsVerification": false,
"timeout": 30000,
"agent": {
"model": "FIRE-1",
"prompt": "Your custom prompt here"
}
}
Map URLs from a starting point. Documentation
Example:
{
"url": "https://example.com",
"search": "optional search term",
"ignoreSitemap": true,
"sitemapOnly": false,
"includeSubdomains": false,
"limit": 5000
}
Extract structured data from webpages. Documentation
Example:
{
"urls": ["https://example.com"],
"prompt": "Extract product information",
"schema": {
"name": "string",
"price": "number",
"description": "string"
},
"agent": {
"model": "FIRE-1"
}
}
Get the link to the Firecrawl documentation.
Display help information about available commands and their usage.
The bot uses the following environment variables:
DISCORD_TOKEN
: Your Discord bot tokenCLIENT_ID
: Your Discord application client ID
To set up the environment variables:
- Copy the
.env.example
file to.env
:
cp .env.example .env
- Edit the
.env
file and replace the placeholder values with your actual tokens:
DISCORD_TOKEN=your_discord_bot_token
CLIENT_ID=your_discord_client_id
MIT