Beta API
Batch API Documentation
Process multiple URLs simultaneously with efficient bulk operations
Batch API - Beta
Process multiple URLs simultaneously with a single operation type (preview or extract). Perfect for bulk data processing. Contact us to get your beta API key!
Batch Endpoint
POST /batch
Process multiple URLs in a single request using preview and/or extract operations. Returns results for all URLs with success/failure status.
Request Body:
operation - Operation type: "extract" or "preview" (required)urls - Array of URLs to process (required, max 50)Performance: Processes up to 10 URLs concurrently for optimal speed
Authentication:
API key required via
X-API-Key: YOUR_API_KEY headerRate Limits:
Up to 50 URLs per batch request
Batch Example
# Extract multiple URLscurl -X POST "https://api.ogfetch.com/batch" \-H "X-API-Key: ogf_live_your_api_key_here" \-H "Content-Type: application/json" \-d '{"operation": "extract","urls": ["https://github.com","https://example.com","https://stackoverflow.com"]}'# OR Preview multiple URLs (separate request)curl -X POST "https://api.ogfetch.com/batch" \-H "X-API-Key: ogf_live_your_api_key_here" \-H "Content-Type: application/json" \-d '{"operation": "preview","urls": ["https://reddit.com","https://news.ycombinator.com","https://dev.to"]}'
Response Schema
Batch Response
// Extract operation response{"results": [{"url": "https://example.com","success": true,"data": {"title": "Example Domain","content": "Example Domain This domain is for use in illustrative examples in documents...","excerpt": "This domain is for use in illustrative examples...","word_count": 28,"read_time": 1,"extracted_at": "2025-01-18T12:00:00Z"}},{"url": "https://github.com","success": true,"data": {"title": "GitHub: Let's build from here","content": "GitHub is where over 100 million developers shape the future of software...","excerpt": "GitHub is where over 100 million developers...","word_count": 1250,"read_time": 5,"extracted_at": "2025-01-18T12:00:00Z"}}],"summary": {"total": 2,"successful": 2,"failed": 0,"operation": "extract"}}// Preview operation response{"results": [{"url": "https://example.com","success": true,"data": {"title": "Example Domain","description": "This domain is for use in illustrative examples in documents...","image": "https://example.com/og-image.png","favicon": "https://example.com/favicon.ico"}},{"url": "https://github.com","success": true,"data": {"title": "GitHub: Let's build from here","description": "GitHub is where over 100 million developers shape the future of software...","image": "https://github.githubassets.com/images/modules/site/social-cards/github-social.png","favicon": "https://github.githubassets.com/favicons/favicon.svg"}}],"summary": {"total": 2,"successful": 2,"failed": 0,"operation": "preview"}}
Field Descriptions
results: Array of results for each URL with success/failure status and data
success: Boolean indicating if the URL was processed successfully
data: Extracted data (for successful requests)
- • Extract: content, excerpt, title, url, word_count, read_time, extracted_at
- • Preview: title, description, image, favicon, url
error: Error message (for failed requests) with specific failure reason
summary: Overview with total, successful, failed counts and operation type
Use Cases
Content Aggregation
Process multiple blog posts, articles, or pages simultaneously
Bulk Analysis
Analyze multiple competitor pages or research sources in one request
Data Migration
Extract metadata and content from multiple legacy URLs during site migrations