Skip to main content

Scan projects for APIs, URLs and environment variables

Project description

APIHunterX

🔍 Scan projects for APIs, URLs, SDKs, and environment variables.

APIHunterX helps developers quickly discover external services, API dependencies, and required environment variables used within a codebase.


Features

  • Detect API SDKs and libraries
  • Find API URLs and endpoints
  • Discover environment variables
  • Generate API inventory reports
  • Scan entire projects recursively
  • Simple command-line interface

Installation

pip install apihunterx

Usage

Scan the current project:

api-hunter scan .

Scan a specific directory:

api-hunter scan /path/to/project

Alternative:

python -m api_hunter scan .

Example

Sample Code

import openai
import boto3
import os

client = openai.OpenAI()

api_key = os.getenv("OPENAI_API_KEY")

url = "https://api.openai.com/v1/chat/completions"

Command

api-hunter scan .

Output

==================================================
API HUNTER REPORT
==================================================

DETECTED SERVICES
------------------------------
- OpenAI
- AWS

API URLS
------------------------------
- https://api.openai.com/v1/chat/completions

ENVIRONMENT VARIABLES
------------------------------
- OPENAI_API_KEY

FILES SCANNED: 25

Currently Supported

SDK Detection

  • OpenAI
  • AWS (boto3)
  • Anthropic
  • Stripe
  • Discord
  • Google Gemini
  • Tweepy
  • Requests
  • HTTPX

Environment Variables

Detects:

os.getenv("API_KEY")
os.environ["API_KEY"]

URL Detection

Detects:

"https://api.example.com"
"https://webhook.example.com"

Why APIHunterX?

Many projects rely on external APIs but lack documentation about:

  • Which APIs are used
  • Which API keys are required
  • Which services the application depends on
  • Which external endpoints are being called

APIHunterX automatically generates an inventory to help developers understand projects faster.


Roadmap

v0.2

  • JSON report output
  • Markdown report output
  • Requirements.txt analysis
  • pyproject.toml analysis

v0.3

  • FastAPI route detection
  • Flask route detection
  • OpenAPI discovery
  • Swagger detection

v0.4

  • Hardcoded API key detection
  • Security audit mode
  • Secret exposure warnings

v1.0

  • JavaScript support
  • TypeScript support
  • Dependency graphs
  • HTML reports
  • GitHub Action integration

Installation From Source

git clone https://github.com/samarthpatilML/apihunterx.git

cd apihunterx

pip install -e .

Contributing

Contributions, bug reports, and feature requests are welcome.

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Open a Pull Request

License

MIT License


Author

Samarth Patil

GitHub: https://github.com/samarthpatilML

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apihunterx-0.1.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

apihunterx-0.1.1-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file apihunterx-0.1.1.tar.gz.

File metadata

  • Download URL: apihunterx-0.1.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for apihunterx-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3162880f9859e59a570c3cf4731fbe3b05d1d4d67e5d909092636cfcdf5ac028
MD5 12e03db793295e18e70147f15134a3bf
BLAKE2b-256 a57b667ec8ce68e18b126943dae4c59e01f005d0dfa38b3115ff1a76ad54b8cf

See more details on using hashes here.

File details

Details for the file apihunterx-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: apihunterx-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for apihunterx-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d9a8750915cabcd9d052c719cb85035bacf8deaf9ad8fa57e38e10fc9bdbea1e
MD5 581daba4c0898913c789c589d2d5a8ec
BLAKE2b-256 b1dd5ef6144db278d2c2501828328be0c4503fe81971c324b1f9f7d5b567513b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page