API Reference
Complete reference for Hunt's REST API
Authentication
All API requests require authentication using an API key. Include your API key in the Authorization header:
Authorization: Bearer your-api-key
You can generate API keys in your account settings. Keep your API keys secure and never share them.
Rate Limits
API requests are rate limited based on your subscription plan:
Plan | Rate Limit | Burst Limit |
---|---|---|
Free | 100 requests/hour | 10 requests/second |
Pro | 1,000 requests/hour | 20 requests/second |
Enterprise | 10,000 requests/hour | 50 requests/second |
Error Handling
The API uses standard HTTP status codes and returns error details in JSON format:
{ "error": { "code": "rate_limit_exceeded", "message": "Rate limit exceeded. Please try again in 60 seconds.", "details": { "reset_at": "2024-03-21T10:00:00Z", "limit": 100, "remaining": 0 } } }
CVEs
List CVEs
Retrieve a paginated list of CVEs with optional filtering.
GET /api/v1/cves # Query Parameters severity=high # Filter by severity (low, medium, high, critical) has_exploit=true # Filter CVEs with known exploits affected_product=nginx # Filter by affected product page=1 # Page number per_page=50 # Results per page
Get CVE
Retrieve detailed information about a specific CVE.
GET /api/v1/cves/{cve_id} # Example Response { "id": "CVE-2024-1234", "summary": "Buffer overflow vulnerability in Example Software", "severity": "high", "cvss_score": 8.5, "has_exploit": true, "affected_products": [ { "vendor": "Example Corp", "product": "Example Software", "versions": ["1.0.0", "1.1.0"] } ], "references": [ { "url": "https://example.com/advisory", "type": "advisory" } ], "hackerone_reports": [ { "id": "123456", "title": "Buffer Overflow in Example Software", "url": "https://hackerone.com/reports/123456" } ] }
HackerOne Reports
List Reports
Retrieve a paginated list of disclosed HackerOne reports.
GET /api/v1/reports # Query Parameters severity=high # Filter by severity bounty_min=1000 # Minimum bounty amount program=github # Filter by program page=1 # Page number per_page=50 # Results per page
Get Report
Retrieve detailed information about a specific report.
GET /api/v1/reports/{report_id} # Example Response { "id": "123456", "title": "Remote Code Execution in Example App", "severity": "critical", "bounty_amount": 5000, "disclosed_at": "2024-03-21T10:00:00Z", "program": { "name": "Example Program", "url": "https://hackerone.com/example" }, "reporter": { "username": "security_researcher", "reputation": 1500 }, "weakness": { "cwe_id": "CWE-78", "name": "OS Command Injection" }, "cves": [ { "id": "CVE-2024-1234", "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-1234" } ] }
Inventory
List Products
Retrieve a list of products in your inventory.
GET /api/v1/inventory/products # Query Parameters vendor=microsoft # Filter by vendor type=web_server # Filter by product type has_cves=true # Filter products with active CVEs
Get Product
Retrieve detailed information about a specific product.
GET /api/v1/inventory/products/{product_id} # Example Response { "id": "prod_123", "vendor": "Example Corp", "name": "Example Server", "version": "2.4.1", "type": "web_server", "active_cves": [ { "id": "CVE-2024-1234", "severity": "high", "status": "patched" } ], "hackerone_reports": [ { "id": "123456", "severity": "critical", "status": "resolved" } ], "patches": [ { "version": "2.4.2", "released_at": "2024-03-21T10:00:00Z", "fixes_cves": ["CVE-2024-1234"] } ] }
Webhooks
Receive real-time notifications about new vulnerabilities and updates:
Configure Webhook
POST /api/v1/webhooks # Request Body { "url": "https://your-server.com/webhook", "events": ["cve.new", "report.new", "product.vulnerable"], "secret": "your-webhook-secret" }
Example Webhook Payload
{ "event": "cve.new", "payload": { "cve_id": "CVE-2024-1234", "severity": "high", "affected_products": ["Example Server 2.4.1"], "summary": "Buffer overflow vulnerability in Example Server", "details_url": "https://hunt.security/cve/CVE-2024-1234" }, "timestamp": "2024-03-21T10:00:00Z" }
SDKs & Libraries
Official client libraries for popular programming languages:
Code Examples
Python
from hunt import Client client = Client('your-api-key') # List high severity CVEs cves = client.cves.list(severity='high', has_exploit=True) # Get CVE details cve = client.cves.get('CVE-2024-1234') # Configure webhook client.webhooks.create( url='https://your-server.com/webhook', events=['cve.new', 'report.new'], secret='your-webhook-secret' )
Node.js
const { Client } = require('@hunt/security'); const client = new Client('your-api-key'); // List high severity CVEs const cves = await client.cves.list({ severity: 'high', hasExploit: true }); // Get CVE details const cve = await client.cves.get('CVE-2024-1234'); // Configure webhook await client.webhooks.create({ url: 'https://your-server.com/webhook', events: ['cve.new', 'report.new'], secret: 'your-webhook-secret' });