Skip to content

Instantly share code, notes, and snippets.

@c3l3si4n
Last active May 2, 2025 02:00
Show Gist options
  • Save c3l3si4n/68ac06ebe85f8c0b821800432c7f89a6 to your computer and use it in GitHub Desktop.
Save c3l3si4n/68ac06ebe85f8c0b821800432c7f89a6 to your computer and use it in GitHub Desktop.

Using the PugRecon API

PugRecon provides a powerful API that allows you to integrate domain reconnaissance and S3 bucket discovery capabilities into your own tools and workflows. The API is available at https://pugrecon.com/.

Authentication

All API endpoints require authentication using an API key. To get started:

  1. Register an account at https://pugrecon.com
  2. Generate an API key from your dashboard
  3. Include the API key in the Authorization header of your requests:
    Authorization: Bearer <your-api-key>
    

API Endpoints

1. Domain Query

Endpoint: POST https://pugrecon.com/api/v1/domains

Query for related domain names based on a target domain.

curl https://pugrecon.com/api/v1/domains \
  -X POST \
  -H 'Authorization: Bearer <your-api-key>' \
  -H 'Content-Type: application/json' \
  --data '{"domain_name": "google.com"}'

Response format:

{
    "results": [
        {"name": "mail.google.com"},
        {"name": "drive.google.com"}
        // ... more results
    ],
    "quota_remaining": 19
}

2. S3 Bucket Discovery

Endpoint: GET https://pugrecon.com/api/v1/s3buckets

Search for S3 buckets based on a search term.

curl 'https://pugrecon.com/api/v1/s3buckets?term=company-name' \
  -H 'Authorization: Bearer <your-api-key>'

Response format:

{
    "results": [
        {"name": "company-name-backups"},
        {"name": "company-name-assets"}
        // ... more results
    ],
    "quota_remaining": 19
}

Rate Limits and Tiers

Free Tier

  • Results per query: Limited to 40 results
  • Monthly quota: 20 queries per month
  • Applies to both domain and S3 bucket queries combined

Premium Tier

  • Results per query: Unlimited
  • Monthly quota: 1000 queries per month
  • Applies to both domain and S3 bucket queries combined

When results are limited due to the free tier, the API response will include additional fields:

{
    "results": [...],
    "limited": true,
    "total_results": 100,
    "message": "Results limited. Upgrade for full access.",
    "quota_remaining": 19
}

Error Handling

The API uses standard HTTP status codes:

  • 200: Success
  • 400: Bad Request (invalid input)
  • 401: Unauthorized (invalid API key)
  • 429: Too Many Requests (quota exceeded)
  • 502: Service Error

Error responses include detailed messages:

{
    "error": "Error description",
    "details": "Additional error details"
}

Best Practices

  1. Always check the quota_remaining field in responses to monitor your usage
  2. Implement proper error handling for quota limits and service errors
  3. For S3 bucket searches, use search terms of at least 3 characters
  4. Consider upgrading to Premium tier if you need access to all results or higher query limits

For more information or support, visit https://pugrecon.com/support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment