Convert any URL to clean Markdown from the command line.
Powered by HashScraper — a web crawling and content extraction service.
npm install -g @hashscraper/cliRequires Node.js 18+.
Get your API key from hashscraper.com and configure it:
hashscraper config set api_key YOUR_API_KEYOr use environment variables:
export HASHSCRAPER_API_KEY=YOUR_API_KEYhashscraper https://example.comhashscraper https://example.com -o output.mdhashscraper https://a.com https://b.com --output-dir ./resultshashscraper --input urls.txt --output-dir ./resultshashscraper https://example.com --jsonhashscraper https://example.com --format text| Command | Description |
|---|---|
hashscraper <urls...> |
Convert URLs to Markdown (default) |
hashscraper credits |
Show remaining credits |
hashscraper config set <key> <value> |
Set config (api_key, base_url) |
hashscraper config get <key> |
Get config value |
| Option | Description | Default |
|---|---|---|
--api-key <key> |
API key (overrides config) | — |
-o, --output <path> |
Save to file (single URL only) | stdout |
--output-dir <dir> |
Save each result to directory | — |
--format <format> |
markdown or text |
markdown |
--json |
Output as JSON with metadata | — |
--timeout <ms> |
Request timeout | 30000 |
--input <file> |
Read URLs from text file | — |
--api-keyflagHASHSCRAPER_API_KEYenvironment variable~/.hashscraper/config.json
| Code | Meaning |
|---|---|
| 0 | All URLs processed successfully |
| 1 | All URLs failed |
| 2 | Partial failure (some succeeded, some failed) |
MIT
