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

# API Reference — Google Dorking

## Google Search Operators

| Operator | Syntax | Purpose |
|----------|--------|---------|
| `site:` | `site:example.com` | Restrict to domain |
| `filetype:` | `filetype:pdf` | File type filter |
| `ext:` | `ext:sql` | File extension |
| `inurl:` | `inurl:admin` | URL path matching |
| `intitle:` | `intitle:"index of"` | Title matching |
| `intext:` | `intext:"password"` | Body text search |
| `cache:` | `cache:example.com` | Cached version |
| `link:` | `link:example.com` | Pages linking to URL |
| `related:` | `related:example.com` | Similar sites |
| `-` | `-www` | Exclude term |
| `"..."` | `"exact phrase"` | Exact match |
| `OR` | `admin OR login` | Boolean OR |
| `*` | `"admin * panel"` | Wildcard |
| `..` | `2020..2025` | Number range |

## Google Hacking Database (GHDB)

### Categories
```
Files Containing Juicy Info
Sensitive Directories
Web Server Detection
Vulnerable Files
Vulnerable Servers
Error Messages
Files Containing Passwords
Sensitive Online Shopping Info
Network or Vulnerability Data
Pages Containing Login Portals
Various Online Devices
Advisories and Vulnerabilities
```

### Access
```bash
# Browse GHDB
curl -s "https://www.exploit-db.com/google-hacking-database" | grep -oP 'inurl:[^"<]+'
```

## Pagodo

### Basic Usage
```bash
pagodo -d example.com -g dorks.txt -l 100 -o results.json
```

### Generate Dork List from GHDB
```bash
pagodo -g ghdb_dorks.txt --generate
```

## DorkSearch

### Online Tool
```
https://dorksearch.com/
```

### Common Prebuilt Searches
```
Files containing passwords
Admin login pages
Exposed databases
Directory listings
Config files
```

## Bing Search Operators

| Operator | Syntax |
|----------|--------|
| `site:` | `site:example.com` |
| `filetype:` | `filetype:pdf` |
| `instreamset:` | `instreamset:(url):admin` |
| `feed:` | `feed:security` |
| `ip:` | `ip:1.2.3.4` |

## Rate Limiting Notes

- Google blocks automated queries aggressively
- Use 10-15 second delays between queries minimum
- Rotate user agents and use proxies for bulk dorking
- Consider using Google Custom Search API ($5/1000 queries)

## Google Custom Search API

```bash
curl "https://www.googleapis.com/customsearch/v1?key=$GOOGLE_API_KEY&cx=$SEARCH_ENGINE_ID&q=site:example.com+filetype:pdf"
```

## Environment Variables

| Variable | Description |
|----------|-------------|
| `GOOGLE_API_KEY` | Google Custom Search API key |
| `SEARCH_ENGINE_ID` | Google CSE ID |
