A simple terminal UI for interacting with a self-hosted Firecrawl instance. This application provides a user-friendly interface to explore and utilize the various functionalities of a local Firecrawl instance, including web scraping, crawling, and data extraction.
- Overview
- Features
- Installation
- Usage
- Configuration
- Export System
- API Client
- Examples
- Troubleshooting
- Contributing
- License
Firecrawl Explorer is a terminal-based application built with Python that provides an intuitive interface for interacting with a self-hosted Firecrawl instance. Firecrawl is an API service that takes a URL, crawls it, and converts it into clean markdown or structured data. It crawls all accessible subpages and gives you clean data for each.
The application uses the Rich library to create a visually appealing and interactive terminal UI, making it easy to use Firecrawl's powerful web scraping and crawling capabilities without having to write code or use complex API calls.
Extract content from a single webpage in various formats:
- Markdown: Clean, readable text format
- HTML: Structured HTML content
- Text: Plain text content
- JSON: Structured data format
Options include:
- Extract only main content
- Include/exclude specific HTML tags
- Wait for JavaScript to load
Crawl an entire website and extract content from all pages:
- Follow links within the domain
- Process each page
- Return a structured dataset of all crawled pages
Options include:
- Include/exclude paths using regex patterns
- Set maximum crawl depth
- Limit number of pages to crawl
- Ignore sitemap
- Allow/disallow backward links
- Allow/disallow external links
Discover all links on a website:
- Search for specific terms
- Include/exclude subdomains
- Limit number of results
- Ignore sitemap or use sitemap only
Configure your Firecrawl instance:
- API URL
- API Key (optional for self-hosted instances)
- Export directories
Browse and manage saved exports:
- View file contents
- Delete files
- Search for specific exports
- Open containing folder
Access documentation and information about the application:
- Keyboard shortcuts
- Feature descriptions
- Export system details
- Python 3.6 or higher
- A self-hosted Firecrawl instance running locally or remotely
- Clone the repository or download the source code:
git clone https://github.com/yourusername/firecrawl-explorer.git
cd firecrawl-explorer- Install the required dependencies:
pip install -r requirements.txtThe requirements include:
- requests
- rich
- Make the script executable (Linux/macOS):
chmod +x firecrawl_explorer.pyRun the application using Python:
python firecrawl_explorer.pyOr directly (Linux/macOS):
./firecrawl_explorer.py1: Go to Scrape URL2: Go to Crawl Website3: Go to Map Website4: Go to Settings5: Show Help6: Manage Exportsq: Quit the application
- From the main menu, select option
1(Scrape URL) - Enter the URL to scrape (default is https://firecrawl.dev)
- Select the output format (markdown, HTML, text, or JSON)
- Choose whether to extract only the main content
- View the results in the terminal
- Optionally save the results to a file
- From the main menu, select option
2(Crawl Website) - Enter the URL to crawl (default is https://firecrawl.dev)
- Configure crawl options:
- Exclude paths (comma-separated)
- Include paths (comma-separated)
- Maximum depth
- Maximum pages to crawl
- Wait for the crawl to complete
- View the results in the terminal
- Optionally save the results to a file
- From the main menu, select option
3(Map Website) - Enter the URL to map (default is https://firecrawl.dev)
- Configure map options:
- Search term (optional)
- Include subdomains
- Maximum links to return
- View the results in the terminal
- Optionally save the results to a file
- From the main menu, select option
6(Manage Exports) - Select a category to browse (Scrapes, Crawls, Maps, Docs, Custom, or All Exports)
- View the list of files in the selected category
- Choose an action:
- View file contents
- Open containing folder
- Delete file
- Search files
By default, Firecrawl Explorer connects to a local Firecrawl instance at http://localhost:3002. You can change this and other settings:
- From the main menu, select option
4(Settings) - Update the API URL if your Firecrawl instance is running at a different address
- Add an API key if required (optional for self-hosted instances)
- Configure export directories
The application creates an exports directory in the same location as the script, with subdirectories for different types of exports:
exports/scrapes: Single page scraping resultsexports/crawls: Multi-page crawling resultsexports/maps: Website mapping resultsexports/docs: Documentation and guidesexports/custom: Any other exports
You can change these directories in the Settings menu.
Firecrawl Explorer includes a comprehensive export system that allows you to save and organize your data:
- Markdown (.md): Clean, readable text format
- HTML (.html): Structured HTML content
- Text (.txt): Plain text content
- JSON (.json): Structured data format
You can add metadata to your exports:
- Descriptions
- Tags
- Export date and time
- Source URL
This metadata is stored either within the JSON file (for JSON exports) or in a separate .meta.json file (for other formats).
The Manage Exports feature allows you to:
- Browse exports by category
- Search for specific exports
- View file contents
- Delete files
- Open containing folders
The FirecrawlClient class provides a Python interface to the Firecrawl API:
Scrape a single URL.
Parameters:
url: The URL to scrapeparams: Additional parameters for the scrape requestformats: List of formats to return (markdown, html, text, json)onlyMainContent: Whether to only return the main content of the pageincludeTags: List of HTML tags to includeexcludeTags: List of HTML tags to excludewaitFor: Time to wait for JavaScript to load in milliseconds
Initiate a crawl job for the specified URL.
Parameters:
url: The URL to crawlparams: Additional parameters for the crawl requestexcludePaths: List of URL pathname regex patterns to excludeincludePaths: List of URL pathname regex patterns to includemaxDepth: Maximum depth to crawl (default: 2)ignoreSitemap: Whether to ignore the sitemap (default: false)limit: Maximum number of pages to crawl (default: 10000)allowBackwardLinks: Allow backward links (default: false)allowExternalLinks: Allow external links (default: false)scrapeOptions: Options for scraping each page
Check the status of a crawl job.
Parameters:
crawl_id: The ID of the crawl job
Map a URL to discover all links.
Parameters:
url: The URL to mapparams: Additional parameters for the map requestsearch: Search query to filter resultsignoreSitemap: Ignore the website sitemap (default: true)sitemapOnly: Only return links from sitemap (default: false)includeSubdomains: Include subdomains (default: false)limit: Maximum number of links to return (default: 5000)timeout: Timeout in milliseconds
Wait for a crawl job to complete.
Parameters:
crawl_id: The ID of the crawl jobpoll_interval: Time in seconds between status checksmax_attempts: Maximum number of status check attempts
Save data to a file.
Parameters:
data: The data to savedirectory: The directory to save the file infilename: The name of the fileformat_type: The format of the data (markdown, html, text, json)
- Start Firecrawl Explorer
- Select option
1(Scrape URL) - Enter the URL of a blog post
- Select "markdown" as the output format
- Choose "Yes" to extract only main content
- View the clean, formatted content in the terminal
- Save the results to a file
- Start Firecrawl Explorer
- Select option
2(Crawl Website) - Enter the URL of a documentation website
- Set exclude paths to avoid crawling irrelevant sections (e.g.,
/blog/,/community/) - Set maximum depth to 3
- Set maximum pages to 200
- Wait for the crawl to complete
- Save the results to a file
- Start Firecrawl Explorer
- Select option
3(Map Website) - Enter the website URL
- Set a high limit to ensure all links are discovered
- Save the results to a file
- Use the data to check for broken links
Problem: Cannot connect to Firecrawl API Solution:
- Ensure your Firecrawl instance is running
- Check the API URL in Settings
- Verify network connectivity
- Check if the API requires authentication
Problem: Cannot save exports Solution:
- Ensure you have write permissions to the export directories
- Check available disk space
- Try using a different export location
Problem: Crawling or mapping is slow Solution:
- Reduce the maximum depth
- Reduce the maximum number of pages
- Use more specific include/exclude paths
- Check your network connection
Contributions to Firecrawl Explorer are welcome! Here's how you can contribute:
- Fork the repository
- Create a new branch for your feature or bugfix
- Make your changes
- Submit a pull request
Please ensure your code follows the existing style and includes appropriate documentation.
This project is licensed under the MIT License - see the LICENSE file for details.
Created with ❤️ for Firecrawl users