api-gw-lite

api-gw-lite

by amernas

This actor serves as a proxy that accepts requests with custom field names and translates them to standard HTTP requests to target APIs. It's designed...

50,538 runs
4 users
Try This Actor

Opens on Apify.com

About api-gw-lite

This actor serves as a proxy that accepts requests with custom field names and translates them to standard HTTP requests to target APIs. It's designed to work seamlessly on the Apify platform while also supporting local testing

What does this actor do?

api-gw-lite is a web scraping and automation tool available on the Apify platform. It's designed to help you extract data and automate tasks efficiently in the cloud.

Key Features

  • Cloud-based execution - no local setup required
  • Scalable infrastructure for large-scale operations
  • API access for integration with your applications
  • Built-in proxy rotation and anti-blocking measures
  • Scheduled runs and webhooks for automation

How to Use

  1. Click "Try This Actor" to open it on Apify
  2. Create a free Apify account if you don't have one
  3. Configure the input parameters as needed
  4. Run the actor and download your results

Documentation

Simple API Gateway Actor A lightweight, efficient API Gateway that forwards HTTP requests to target APIs with proxy support and structured results. ## Overview This Apify Actor serves as a simple HTTP client that accepts requests with intuitive field names and forwards them to target APIs. It's designed for simplicity and efficiency, focusing on core functionality without unnecessary complexity. ## Key Features - ✅ All HTTP methods (GET, POST, PUT, DELETE, PATCH, OPTIONS, HEAD) - ✅ Custom headers and authentication support - ✅ URL query parameters handling - ✅ JSON request bodies for POST/PUT/PATCH - ✅ Apify proxy integration for IP rotation - ✅ Structured results in Apify Results tab - ✅ Error handling with graceful HTTP error responses - ✅ Lightweight - single file implementation ## Input Configuration ### Required Fields - destination (string): The target URL endpoint ### Optional Fields - actionType (string): HTTP method (default: "GET") - requestSignals (object): HTTP headers - queryDetails (object): URL query parameters - payloadContent (object): JSON request body - proxySettings (object): Proxy configuration ## Usage Examples ### 1. Simple GET Request json { "actionType": "GET", "destination": "https://jsonplaceholder.typicode.com/posts/1", "requestSignals": { "User-Agent": "ApifyActor/1.0", "Accept": "application/json" }, "queryDetails": { "format": "json", "limit": "10" } } ### 2. POST with JSON Body json { "actionType": "POST", "destination": "https://jsonplaceholder.typicode.com/posts", "requestSignals": { "Content-Type": "application/json", "Authorization": "Bearer your-token-here" }, "payloadContent": { "title": "Sample Post", "body": "This is a test post", "userId": 1 } } ### 3. API with Authentication json { "actionType": "GET", "destination": "https://api.github.com/user/repos", "requestSignals": { "Authorization": "token ghp_your_github_token_here", "Accept": "application/vnd.github.v3+json" }, "queryDetails": { "type": "owner", "sort": "updated", "per_page": "5" } } ### 4. With Proxy Settings json { "actionType": "GET", "destination": "https://httpbin.org/ip", "requestSignals": { "Accept": "application/json" }, "proxySettings": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] } } ## Field Mapping | Input Field | Maps To | Purpose | |-------------|---------|---------| | actionType | HTTP Method | GET, POST, PUT, DELETE, etc. | | destination | Target URL | Complete endpoint URL | | requestSignals | HTTP Headers | Authorization, Content-Type, etc. | | queryDetails | Query Parameters | URL parameters (?key=value) | | payloadContent | Request Body | JSON data for POST/PUT requests | | proxySettings | Proxy Config | Apify proxy settings | ## Output Format The actor provides two types of output: ### Results Tab (Dataset) json { "success": true, "status_code": 200, "content_type": "application/json", "full_response": { "...actual API response..." } } ### Key-Value Store (OUTPUT) Complete raw response including all headers and metadata. ## File Structure ├── apify_main.py # Main Actor implementation ├── Dockerfile # Docker configuration ├── requirements.txt # Python dependencies ├── INPUT.json # Example configurations ├── README.md # This documentation └── .actor/ ├── actor.json # Actor metadata └── input_schema.json # Input validation schema ## Requirements - httpx - HTTP client library - apify - Apify SDK for Python ## Error Handling The actor gracefully handles: - ❌ Invalid URLs or network issues - ❌ Authentication failures - ❌ HTTP error status codes (4xx, 5xx) - ❌ Malformed JSON responses - ❌ Proxy connection issues All errors are logged with detailed messages and returned in structured format. ## Running the Actor ### On Apify Platform 1. Upload this actor to Apify 2. Configure input using the examples in INPUT.json 3. Run the actor 4. View results in the "Results" tab ### Local Testing bash python apify_main.py ## Common Use Cases - API Testing - Test REST API endpoints - Data Collection - Fetch data from APIs - Webhook Forwarding - Forward requests to internal APIs - Authentication Testing - Test different auth methods - Proxy Testing - Test APIs through different IP addresses ## Tips - Use httpbin.org endpoints for testing - Check the "Results" tab for formatted output - Enable Apify proxy for IP rotation - Add proper User-Agent headers for better success rates - Use Content-Type: application/json for JSON payloads --- Simple, efficient, and reliable API Gateway for all your HTTP request needs! 🚀

Common Use Cases

Market Research

Gather competitive intelligence and market data

Lead Generation

Extract contact information for sales outreach

Price Monitoring

Track competitor pricing and product changes

Content Aggregation

Collect and organize content from multiple sources

Ready to Get Started?

Try api-gw-lite now on Apify. Free tier available with no credit card required.

Start Free Trial

Actor Information

Developer
amernas
Pricing
Paid
Total Runs
50,538
Active Users
4
Apify Platform

Apify provides a cloud platform for web scraping, data extraction, and automation. Build and run web scrapers in the cloud.

Learn more about Apify

Need Professional Help?

Couldn't solve your problem? Hire a verified specialist on Fiverr to get it done quickly and professionally.

Find a Specialist

Trusted by millions | Money-back guarantee | 24/7 Support