grAPI — Live API Discovery Tool
grAPI is a simple but powerful utility for pentesters and security researchers who need to discover API endpoints on websites by interacting with them in real time. It uses Playwright under the hood to launch a real browser so you can explore the target and see API calls pop up in your terminal as they happen.
What It Does
This tool:
- Opens your target URL in a real browser so you can click around just like a user.
- Captures any API endpoints the page hits via XHR, Fetch or other network calls.
- Scans loaded JavaScript files for hidden or hardcoded API paths.
- Gives you color coded output instantly so you don’t have to wait.
- Lets you save the endpoints in a simple txt or json file.
- Generates a Postman collection for easy import into Postman or Burp.
Why It’s Useful
Unlike traditional scanners that only look at source code, grAPI listens to actual traffic as you use the page. That means it catches dynamic APIs that appear after a click, form submit or other interaction.
And because you do the browsing yourself, you control exactly which parts of the app you want to explore. The output is kept clean and minimal so you can jump straight into testing.
Installation
Make sure you have Python 3.10+ installed.
You can install grAPI using pip from the local folder:
git clone https://github.com/DghostNinja/grAPI.git
cd grAPI
pip install grAPI
Or from source
git clone https://github.com/yourusername/grAPI
cd grAPI
pip install .
Usage
Here’s a typical example:
python3 grAPI.py --url https://targetsite.com -o apis.txt -p apis.postman.json
This will:
- Launch the browser and open the target.
- Print API endpoints as they happen — color coded by HTTP method.
- Save them into a file (
apis.txt) and a Postman collection (apis.postman.json).
When you’re done exploring the app, hit Enter in your terminal to stop the scan.
Optional Arguments
| Argument | Description |
|---|---|
--url |
Target page URL |
--timeout |
Page load timeout in seconds. 0 disables timeout |
--scroll |
Automatically scrolls the page to trigger more API calls |
-o |
Output filename for saving endpoints (txt or json) |
-p |
Export captured endpoints as a Postman collection file |
Example Output
[API detected] POST: http://crapi.apisec.ai/identity/api/auth/forget-password
[API detected] GET: http://crapi.apisec.ai/shop/api/products
[JS-detected] /user/profile/update-profile-picture/
After hitting Enter:
[+] Total API endpoints captured: 3
[+] Saved 3 endpoints to apis.txt
[+] Saved Postman collection to apis.postman.json
License
This project is licensed under the terms of the MIT License. You are free to use, modify, and distribute it as needed.
Contribute
If you’ve got feature ideas or improvements, feel free to open an issue or send a pull request.
That’s it. Have fun breaking things and stay curious.
Made with ☕ by iPsalmy
Metadata
Release files for grapix 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| grapix-0.1.2.tar.gz | 6.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| grapix-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.0 kB
Release files / grapix-0.1.2.tar.gz
| Download URL | grapix-0.1.2.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
68d15a33f69f618c90c98234b2632741d32dcabe44a878f634ce2cc7b26b7102
|
|
BLAKE2b-256 checksum How to use checksums |
4623440748981154772f208f50069dc385f92d4503b87e4e6733fa2c5fc465dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.2
|
Release files / grapix-0.1.2-py3-none-any.whl
| Download URL | grapix-0.1.2-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
de9d14f101dfa908b4aacd9840fbd50b1e66f2835a10feafdde073cf602572ee
|
|
BLAKE2b-256 checksum How to use checksums |
fe88718ad85e6dd9aea99fdfa402c9f94489b6b5103c9f8d0c055ee78c30f2df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.2
|
Security for grapix 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.