API Documentation
API Documentation
Complete reference for the Vulnerable by Design BountyPy API
Introduction
The BountyPy API provides a powerful interface for security researchers and bug bounty hunters to interact with HackerOne's platform programmatically. This library helps you manage your bug bounty workflow, analyze your performance, and stay on top of new programs and opportunities.
Quick Start
Install the BountyPy library using pip:
$ pip install bountpy
Core API
Initialization
To start using BountyPy, you need to initialize it with your HackerOne API credentials.
300">"text-blue-400">import bountpy# Initialize with your HackerOne API keybounty = bountpy.300">"text-blue-400">in200">it({300">'key': 300">'YOUR_HACKERONE_API_KEY',300">'username': 300">'YOUR_HACKERONE_USERNAME'})
Parameters
Programs API
Reports API
Your Reports
Access and analyze your submitted bug reports.
# Get all your submitted reportsmy_rep300">"text-blue-400">orts = bounty.rep300">"text-blue-400">or200">ts().200">submitted().200">get()# Get monthly statisticsmonthly_stats = bounty.rep300">"text-blue-400">or200">ts().200">submitted().200">monthly_stats()# Get your report acceptance rateacceptance_rate = bounty.rep300">"text-blue-400">or200">ts().200">submitted().200">acceptance_rate()
Visualize Your Data
BountyPy makes it easy to visualize your bug bounty performance with built-in plotting functions.
300">"text-blue-400">import matplotlib.pyplot as plt# Plot your earnings over timemonthly_stats = bounty.rep300">"text-blue-400">or200">ts().200">submitted().200">monthly_stats()plt.200">figure(figsize=(12, 6))plt.200">plot(monthly_stats[300">'month'], monthly_stats[300">'earn400300">">ings'])plt.200">title(300">'Monthly Earn400300">">ings')plt.200">xlabel(300">'Month')plt.200">ylabel(300">'Earn400300">">ings ($)')plt.200">grid(300">"text-blue-400">True)plt.200">show()# Plot your report acceptance rateacceptance_rate = bounty.rep300">"text-blue-400">or200">ts().200">submitted().200">acceptance_rate()labels = [300">'Accepted', 300">'Rejected', 300">'Duplicate', 300">'Pend400300">">ing']sizes = [acceptance_rate[300">'accepted'],acceptance_rate[300">'rejected'],acceptance_rate[300">'duplicate'],acceptance_rate[300">'pend400300">">ing']]plt.200">figure(figsize=(8, 8))plt.200">pie(sizes, labels=labels, autopct=300">'%1.1f%%')plt.200">title(300">'Rep400300">">ort Acceptance Rate')plt.200">show()
Vulnerability Reports API
Submit Vulnerability Report
Submit and manage vulnerability reports for bug bounty programs.
# Submit a new vulnerability reportrep300">"text-blue-400">ort = bounty.rep300">"text-blue-400">ort.200">create({300">'program_id': 123,300">'title': 300">'XSS 400300">">in Search Function',300">'description': 300">'I found a cross-site script400300">">ing vulnerability 400300">">in the search function',300">'severity': 300">'high',300">'proof_of_concept': 300">'Steps to reproduce: 1. Go to search page 2. Enter \"\300">"'})# Get all your submitted reportsmy_rep300">"text-blue-400">orts = bounty.rep300">"text-blue-400">orts.my_rep300">"text-blue-400">or200">ts().200">get()# Get a specific report by IDrep300">"text-blue-400">ort = bounty.rep300">"text-blue-400">or200">t(456).200">get()
Parameters
Report Statistics
Get statistics on your submitted vulnerability reports.
# Get report statisticsstats = bounty.rep300">"text-blue-400">orts.200">stats()pr300">"text-blue-400">in200">t(f300">"Total rep400300">">orts: {stats['total300">']}")pr300">"text-blue-400">in200">t(f300">"Accepted rep400300">">orts: {stats['by_status300">']['accepted300">']}")pr300">"text-blue-400">in200">t(f300">"Rep400300">">orts by severity: {stats['by_severity300">']}")
Filtering and Searching Reports
Filter and search your vulnerability reports to find specific information.
# Get reports with specific statusaccepted_rep300">"text-blue-400">orts = bounty.rep300">"text-blue-400">orts.my_rep300">"text-blue-400">or200">ts().200">filter(status=300">'accepted').200">get()# Get reports for a specific programgithub_rep300">"text-blue-400">orts = bounty.rep300">"text-blue-400">orts.my_rep300">"text-blue-400">or200">ts().200">filter(program_id=123).200">get()# Get high severity reportshigh_severity = bounty.rep300">"text-blue-400">orts.my_rep300">"text-blue-400">or200">ts().200">filter(severity=300">'high').200">get()# Search reports by keywordsearch_results = bounty.rep300">"text-blue-400">orts.my_rep300">"text-blue-400">or200">ts().200">search(300">'authentication bypass').200">get()
Ready to supercharge your bug bounty workflow?
Get started with BountyPy today to track your bug bounty performance, discover new programs, and automate your workflow.
Get Started