A Python script that parses an HTML page and identifies API endpoints and their HTTP methods.
This script requires the following libraries:
- requests
- bs4
- termcolor These can be installed using pip:
pip install requests bs4 termcolor
- Set the target URL by changing the url variable in the script.
- Run the script using python api_endpoint_finder.py.
- The script will output the API endpoints and their HTTP methods.
GET https://api.example.com/v1/users
Payload: {}
POST https://api.example.com/v1/users/new
Payload: {'username': 'johndoe', 'password': 'password'}
GET https://api.example.com/v1/users/1
Payload: {}
PUT https://api.example.com/v1/users/1
Payload: {'username': 'johndoe', 'password': 'newpassword'}
DELETE https://api.example.com/v1/users/1
Payload: {}
PATCH https://api.example.com/v1/users/1
Payload: {'username': 'johndoe'}
HEAD https://api.example.com/v1/users
Payload: {}
GET: #0f6ab4
POST: #10a54a
PUT: #c5862b
DELETE: #a41e22
PATCH: #D38042
HEAD: #ffd20f
I am a Software QA Engineer and Certified Ethical Hacker, these two of my professional Designations. I Design manual and automated test frameworks from scratch, SDLC utilizes Waterfall and Scrum. Also Work with Software QA, verification, and validation of software products, Multiple online form factor validations, verified algorithm designs and ran Matlab scripts
This project is public: