
A powerful directory brute-force tool that's tailored for recursive/multiplex operations, API discovery and enumeration, JS file scraping, and lists API HTTP methods, in one command. This is not ONLY for APIs, my tool just excels at them
A powerful directory brute-force tool designed for API reconnaissance and penetration testing. Automatically discovers hidden API endpoints, performs recursive subscanning, and probes HTTP methods for deeper API enumeration.
✨ Core Capabilities:
requests librarytmux (optional, for --split flag)xfce-terminal (for Linux desktop environments)# Clone the repository
git clone https://github.com/austinjump-sec/API-SPY.git
cd API-SPY
# Install dependencies
pip install requests
# Make scripts executable (optional)
chmod +x apispy.py apiprobe.py
python3 apispy.py <baseUrl> <wordlist> [OPTIONS]
| Argument | Description |
|---|---|
<baseUrl> | Target URL (e.g., http://example.com or http://api.example.com) |
<wordlist> | Path to wordlist file containing endpoints (one per line) |
python3 apispy.py http://api.example.com wordlist.txt
python3 apispy.py http://api.example.com wordlist.txt -t10
python3 apispy.py http://api.example.com wordlist.txt -t5 --split
python3 apispy.py http://api.example.com/v1 wordlist.txt -t20
The tool starts by testing a predefined set of common API paths:
api, v1, v2, api/v1, api/v2, graphql, rest#)200, 401, 403When an endpoint is found, you're prompted:
'-> Subscan <url>? (y/n) [Auto-skip in 5s]:
y/yes to recursively scan that endpoint with the same wordlistAfter subscanning, you're prompted:
'-> Probe methods on <url>? (y/n) [Auto-skip in 5s]:
apiprobe.py which tests HTTP methods on the discovered endpointAllow header hints[+] Url found: http://api.example.com/v1 ← 200 OK (accessible)
'-> Subscan http://api.example.com/v1? (y/n) [Auto-skip in 0s]:
[-] Timeout: Skipped prompt for http://api.example.com/v1?
'-> Probe methods on http://api.example.com/v1? (y/n) [Auto-skip in 4s]:
[-] Url found but not permitted (403 ERR): ... ← Forbidden but exists
[-] Url found but not permitted (401 ERR): ... ← Requires authentication
[+] GET -> STATUS: 200 OK (Size: 1024)
[-] POST -> STATUS: 405 (Size: 0)
[Header Hint] Allow: GET, HEAD, OPTIONS
Create a simple text file with endpoints (one per line):
admin
users
api/users
v1/products
v2/customers
/api/v1/auth
/graphql
search
data
config
Note: Lines starting with # are treated as comments and ignored.
Popular API wordlists to use with API-SPY:
# Stealth mode (low threads)
python3 apispy.py http://target.com wordlist.txt -t3
# Balanced mode
python3 apispy.py http://target.com wordlist.txt -t15
# Aggressive mode
python3 apispy.py http://target.com wordlist.txt -t50
timeout=5 in source code to customizeEnsure the wordlist path is correct and the file exists:
ls -la /path/to/wordlist.txt
When subscanning, ensure:
apispy.pyapiprobe.pyIf --split fails:
sudo apt install tmuxtmux new-session -s scancurl http://your-url/check_status() function⚠️ Legal & Ethical:
Edit the source code to adjust timeout values:
def ask_subscan(url, wordlist, timeout=10): # Change from 5 to 10 seconds
Create wordlists targeting specific API paths:
# Admin endpoints only
grep -i "admin" full-wordlist.txt > admin-wordlist.txt
# v1 API only
grep "v1" full-wordlist.txt > v1-wordlist.txt
Scan multiple targets with a loop:
for target in http://target1.com http://target2.com http://target3.com; do
python3 apispy.py "$target" wordlist.txt -t10
done
Contributions are welcome! Feel free to:
This tool is provided for educational and authorized security testing purposes only. Users are responsible for ensuring they have proper authorization before scanning any systems. Unauthorized access to computer systems is illegal.
This project is provided as-is for security research and authorized testing purposes.
Created by: austinjump-sec
Repository: austinjump-sec/API-SPY
| Argument | Description |
|---|
--t<number> | Thread count (max 150, default: 1) |
--split | Use tmux split-window instead of new terminal windows |
--debug | Shows otherwise hidden error messages |
--loud | Shows all messages, positive and errors, highlighting any that dont return 404 |
--js | Scans for JavaScript files and scrapes any found ones for common hardcoded API endpoints |