URL Parameter

The url parameter is required for the Screenshot API and specifies which webpage to capture.

Specifications

PropertyValue
Typestring
RequiredYes
DefaultNone
APIScreenshot API only

Description

The URL of the webpage you want to screenshot. The URL must be:

  • Publicly accessible
  • A valid URL with protocol (http:// or https://)
  • Responsive within a reasonable timeout period

We strongly recommend using the webhook_url parameter with URL screenshots, as page load times can be unpredictable and may exceed the 30-second timeout limit.

Examples

Basic URL Screenshot

{
    "url": "https://example.com"
}

Response:

{
    "success": true,
    "credits_remaining": 95,
    "id": "abc123",
    "url": "https://i.html2img.com/abc123.png"
}

URL with Query Parameters

{
    "url": "https://example.com/search?q=test&page=1"
}

URL with Specific Viewport

{
    "url": "https://example.com",
    "width": 1920,
    "height": 1080
}

Some websites may block or behave differently when accessed by our service. Ensure the target website:

  • Doesn’t require authentication
  • Allows automated access
  • Is publicly accessible