HTTP API & Webhook Gateway avatar
HTTP API & Webhook Gateway

Pricing

$5.00 / 1,000 results

Go to Apify Store
HTTP API & Webhook Gateway

HTTP API & Webhook Gateway

Developed by

Traffic Architect

Traffic Architect

Maintained by Community

A versatile actor that functions as both a powerful HTTP client and a secure webhook receiver. If your application can trigger an Apify actor but can't make direct HTTP calls, use this tool to interact with any external API. It also provides a stable endpoint to receive incoming webhooks.

0.0 (0)

Pricing

$5.00 / 1,000 results

0

2

2

Last modified

3 days ago

API Gateway

A powerful Apify Actor for making HTTP requests to external APIs with advanced features like retries, proxy support, and comprehensive error handling.

πŸš€ Quick Start

Simple GET Request

{
"method": "GET",
"url": "https://api.example.com/data",
"headers": {
"Authorization": "Bearer your-token"
}
}

POST with JSON Data

{
"method": "POST",
"url": "https://api.example.com/users",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer your-token"
},
"data": {
"name": "John Doe",
"email": "john@example.com"
}
}

✨ Features

  • βœ… All HTTP Methods - GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD
  • βœ… Custom Headers - Authorization, Content-Type, User-Agent, etc.
  • βœ… Request Body Support - JSON, form data, raw content
  • βœ… Query Parameters - URL parameters with automatic encoding
  • βœ… Retry Logic - Exponential backoff for transient failures
  • βœ… Proxy Support - Apify Proxy for IP rotation
  • βœ… Error Handling - Comprehensive error reporting
  • βœ… Security - No credential logging
  • βœ… Multiple Formats - JSON, text, binary response handling

πŸ“ Configuration Examples

API Testing

{
"method": "GET",
"url": "https://jsonplaceholder.typicode.com/posts/1",
"headers": {
"Accept": "application/json"
}
}

Authentication with Bearer Token

{
"method": "GET",
"url": "https://api.github.com/user",
"headers": {
"Authorization": "Bearer ghp_your_token_here",
"User-Agent": "MyApp/1.0"
}
}

POST with Form Data

{
"method": "POST",
"url": "https://httpbin.org/post",
"headers": {
"Content-Type": "application/x-www-form-urlencoded"
},
"data": {
"username": "john",
"password": "secret"
},
"bodyMode": "form"
}

Request with Query Parameters

{
"method": "GET",
"url": "https://api.example.com/search",
"params": {
"q": "search term",
"page": 1,
"limit": 10
},
"headers": {
"Accept": "application/json"
}
}

Request with Retries

{
"method": "GET",
"url": "https://httpbin.org/delay/2",
"timeoutSecs": 30,
"retry": {
"attempts": 3,
"backoffSeconds": 2
}
}

Request with Proxy

{
"method": "GET",
"url": "https://httpbin.org/ip",
"proxySettings": {
"useApifyProxy": true,
"apifyProxyGroups": ["RESIDENTIAL"]
}
}

βš™οΈ Configuration Options

Required Fields

  • url - Target API endpoint (required)

Optional Fields

  • method - HTTP method (default: "GET")
  • headers - HTTP headers object
  • data - Request body data (for POST, PUT, PATCH)
  • params - URL query parameters object
  • timeoutSecs - Request timeout in seconds (default: 60)
  • followRedirects - Follow HTTP redirects (default: true)
  • bodyMode - Body encoding: "auto", "json", "form", "raw" (default: "auto")
  • retry - Retry configuration object
    • attempts - Number of retry attempts (default: 1)
    • backoffSeconds - Base delay between retries (default: 1)
  • proxySettings - Proxy configuration object
    • useApifyProxy - Use Apify Proxy (default: false)
    • apifyProxyGroups - Proxy groups (e.g., ["RESIDENTIAL"])
  • verbose - Enable verbose output for debugging (default: false)

🎯 Common Use Cases

πŸ”— API Integration

  • REST API Testing - Validate API endpoints
  • Data Collection - Fetch data from external APIs
  • Webhook Forwarding - Forward requests to internal systems
  • API Monitoring - Check API health and performance

πŸ” Authentication

  • Bearer Tokens - OAuth and API key authentication
  • Basic Auth - Username/password authentication
  • Custom Headers - API-specific authentication methods

🌐 Web Scraping Support

  • Form Submissions - Submit forms programmatically
  • Session Management - Maintain login sessions
  • Rate Limiting - Respect API rate limits with retries

πŸ”„ Automation

  • Clay/Zapier/Make Integration - Connect with automation platforms
  • Data Synchronization - Sync data between systems
  • Batch Processing - Process multiple requests efficiently

πŸ“Š Output Format

Results Tab (Quick View)

{
"success": true,
"status_code": 200,
"content_type": "application/json",
"preview": "Response preview..."
}

Key-Value Store (Complete Data)

Access the complete response data including:

  • Full response headers
  • Complete response body (JSON, text, or base64)
  • Request metadata
  • Error details (if any)

πŸ›‘οΈ Security & Best Practices

  • βœ… Secure Logging - Credentials never logged
  • βœ… Error Handling - Graceful failure management
  • βœ… Input Validation - Schema-based validation
  • βœ… Timeout Protection - Prevents hanging requests
  • βœ… Retry Logic - Handles transient failures

πŸ’‘ Tips & Tricks

Testing APIs

  • Use httpbin.org for testing HTTP functionality
  • Start with simple GET requests before complex POST requests
  • Check the Results tab for quick feedback

Authentication

  • Store sensitive tokens in Apify secrets
  • Use proper User-Agent headers to identify your requests
  • Test authentication with a simple endpoint first

Error Handling

  • Enable retries for production workflows
  • Set appropriate timeouts for your use case
  • Check both Results tab and Key-value store for complete error details

Performance

  • Use Apify Proxy for IP rotation when needed
  • Set reasonable timeouts to avoid long waits
  • Monitor request patterns to optimize retry settings

πŸ“¬ Webhook Receiver Mode

This actor can also function as a secure HTTPS webhook receiver using Apify's native API endpoints.

How It Works

  1. Send webhook data to your actor's task run URL
  2. The actor detects that no url is provided
  3. It automatically stores the incoming webhook payload in the dataset
  4. No configuration needed - just send data!

Example Webhook Usage

  • Endpoint: https://api.apify.com/v2/actor-tasks/YOUR_TASK_ID/runs?token=YOUR_API_TOKEN
  • Method: POST
  • Body: Any JSON payload

The actor will store the entire payload in the dataset, making it easy to process with other actors or download for analysis.

Benefits

  • βœ… Secure HTTPS - Uses Apify's secure infrastructure
  • βœ… Reliable - Leverages Apify's scaling and availability
  • βœ… Simple - No complex setup required
  • βœ… Flexible - Handles any webhook payload structure

Need technical details? Contact developper for implementation details, build instructions, and development setup.

Simple, reliable, and feature-rich API Gateway for all your HTTP needs! πŸš€