<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->

# API Reference — Web Archive Intelligence

## Wayback Machine CDX API

### Search URLs
```bash
curl -s "https://web.archive.org/cdx/search/cdx?url=example.com/*&output=json&fl=original,timestamp,statuscode&limit=10000"
```

### Collapse by URL Key
```bash
curl -s "https://web.archive.org/cdx/search/cdx?url=example.com/*&output=json&collapse=urlkey"
```

### Date Range Filter
```bash
curl -s "https://web.archive.org/cdx/search/cdx?url=example.com&from=20230101&to=20231231&output=json"
```

### Retrieve Snapshot
```bash
curl -s "https://web.archive.org/web/20230601120000/https://example.com/"
```

### Available Snapshots
```bash
curl -s "https://archive.org/wayback/available?url=example.com"
```

## waybackurls

### Basic Usage
```bash
echo "example.com" | waybackurls > urls.txt
```

### With Subdomains
```bash
echo "example.com" | waybackurls -dates | sort -u
```

## gau (GetAllUrls)

### All Sources
```bash
echo "example.com" | gau --threads 5 --subs --o urls.txt
```

### Specific Providers
```bash
echo "example.com" | gau --providers wayback,commoncrawl,otx
```

## waymore

### URL Mode
```bash
waymore -i example.com -mode U -oU urls.txt
```

### Response Mode
```bash
waymore -i example.com -mode R -oR responses/
```

### With Filtering
```bash
waymore -i example.com -mode U -oU urls.txt -f -t 10
```

## CommonCrawl API

### Index List
```bash
curl -s "https://index.commoncrawl.org/collinfo.json" | jq '.[0].cdx-api'
```

### Search
```bash
curl -s "https://index.commoncrawl.org/CC-MAIN-2024-10-index?url=example.com/*&output=json"
```

## Environment Variables

| Variable | Description |
|----------|-------------|
| No API keys required | All services are free and public |
