YetAnotherAPI Documentation
Signup for APIGo to main websiteContact Support
  • API Documentation
    • YetAnotherAPI Overview
    • Authentication
  • Integrations
    • Pabbly-Connect
  • Document parser
    • PDF Parser
    • Doc Parser
    • PNG & JPG Parser
    • TXT Parser
    • Parser Processing Status
  • Web Scrapper [deprecated]
    • Basic Web Scraper
    • LLM Web Scraper
    • Scrapper Processing Status
  • Web Scraper
    • Basic Web Scraper
    • Webpage links Scrapper
    • Metadata Scrapper
    • Webhook Notification
    • Status Check
  • LLM Web Scraper
    • Basic Text
    • Structured JSON
    • Best Practices
    • Use Cases
    • Status Check
  • UChat Webhook System
Powered by GitBook
On this page
  • Webhook Configuration
  • Webhook Request Details
  • Webhook Behavior
  • Testing Webhooks

Was this helpful?

  1. Web Scraper

Webhook Notification

When you provide a webhook URL in your scraping request, our system will automatically send the results to your specified endpoint once processing is complete.

Webhook Configuration

Add the webhook URL to your scraping request:

{
    "url": "https://example.com",
    "webhook": "https://your-webhook-url.com/endpoint"
}

Webhook Request Details

Headers

Header
Value

Content-Type

application/json

User-Agent

Web-Scraper-Webhook/1.0

Payload Structure

The webhook will send a POST request with the following JSON structure:

{
    "request_id": "550e8400-e29b-41d4-a716-446655440000",
    "status": "completed",
    "url": "https://example.com",
    "timestamp": 1635545600,
    "content": {
        "txt": "Extracted text content...",
        "markdown": "# Markdown content...", // If markdown was requested
        "meta": {
            "title": "Page Title",
            "description": "Meta description...",
            "og:image": "https://example.com/image.jpg",
            // ... other meta tags
        },
        "schema": [
            // Array of schema.org structured data
            {
                "type": "Article",
                "properties": {
                    "headline": "Article Title",
                    "datePublished": "2023-01-01"
                }
            }
        ],
        "images": [
            {
                "url": "https://example.com/image.jpg",
                "alt": "Image description",
                "title": "Image title"
            }
        ],
        "links": [
            {
                "text": "Link text",
                "url": "https://example.com/link",
                "type": "internal",
                "location": 0
            }
        ]
    },
    "llm_output": { // Only present if LLM processing was requested
        // Structured JSON based on the provided prompt
    }
}

Webhook Behavior

Retry Policy

  • Maximum retries: 3 attempts

  • Retry interval: Exponential backoff starting at 5 seconds

  • Timeout: 10 seconds per attempt

Success Criteria

  • HTTP 2XX response is considered successful

  • Any other response code will trigger a retry

  • After all retry attempts are exhausted, the webhook status will be marked as failed

Error Handling

If the webhook delivery fails, the status can be checked via the status endpoint:

{
    "webhook_status": "failed",
    "webhook_error": "Failed to deliver webhook notification",
    "webhook_timestamp": 1635545600
}

Testing Webhooks

For development and testing, we recommend:

  1. Implementing a test endpoint that logs webhook payloads

PreviousMetadata ScrapperNextStatus Check

Last updated 5 months ago

Was this helpful?

Using tools like for initial testing

Setting up a local tunnel using for development

webhook.site
ngrok