URL to Static HTML Converter API Integration Guide

Save webpages as downloadable HTML files for review, archiving, and content workflows.

Try the live demoView API details →

URL to Static HTML Converter API Integration Guide

Save a public webpage as an HTML document and receive its download URL. Static styles and resources may be embedded in the file. JavaScript-dependent content is not rendered, so interactive pages may differ from their appearance in a browser.

Start here: Try the live demo or view the current API details.

API details

Item Value
API name URL to Static HTML Converter
Category Website Tools APIs
Method POST
Endpoint https://api.gugudata.io/v1/websitetools/url2html
Content type application/json
Demo endpoint https://api.gugudata.io/v1/websitetools/url2html/demo
Detail page https://gugudata.io/details/url2html
OpenAPI JSON https://gugudata.io/assets/openapi/gugudata.openapi.3.1.json

When to use this API

  • Capture static HTML snapshots of public pages.
  • Keep page copies for review and change tracking.
  • Prepare page HTML for downstream parsers.

Request parameters

This endpoint accepts parameters through the query string plus request body. Keep appkey out of client-side public code and send it only from trusted server-side environments.

Parameter Type Required Default Description
appkey string Yes - Application key in the query string.
url string Yes - Complete HTTP or HTTPS URL in the JSON body, up to 2,048 characters. Credentials, IP addresses and nonstandard ports are not accepted.

Example request

curl -X POST "https://api.gugudata.io/v1/websitetools/url2html?appkey=YOUR_APPKEY" \
  -H "Content-Type: application/json" \
  -d '
{
  "url": "https://gugudata.io/"
}
'

Response fields

The API returns JSON, not the HTML file itself. Download the file from data.url and save your own copy when long-term retention is required. The result URL is public; permanent hosting is not guaranteed.

Field Type Required Description
dataStatus.statusCode integer Yes Business status code; 200 indicates success.
dataStatus.statusDescription string Yes Status description.
dataStatus.responseDateTime string Yes Response timestamp.
dataStatus.dataTotalCount integer Yes Number of returned results.
data.url string Yes HTTPS download URL for the generated HTML document.

Response example

{
  "dataStatus": {
    "statusCode": 200,
    "statusDescription": "successfully",
    "responseDateTime": "2026-04-10T00:00:00Z",
    "dataTotalCount": 1
  },
  "data": {
    "url": "https://storage.gugudata.io/webpages/example.html"
  }
}

HTTP status codes

Use the HTTP status code for transport-level handling. If the response body contains dataStatus.statusCode, treat it as an application-level status field in the JSON payload.

HTTP status Meaning Recommended handling
200 Request processed successfully. Parse the documented response body for the endpoint result.
400 Invalid request parameters or request format. Check required fields, data types, and request body format.
401 Missing or unknown application key. Send a valid appkey with the request.
403 The application key is recognized but access is not allowed. Check subscription, trial state, and endpoint access.
429 Request rate or trial usage limit exceeded. Reduce concurrency or retry after the limit window resets.
500 Internal service error. Retry later or contact support if the error persists.

Download and Demo handling

  • Validate required parameters before sending the request so 400 responses are easier to diagnose.
  • Do not repeatedly retry failed conversions; check the target page and failure status first.
  • Treat downloaded HTML as untrusted webpage content. Do not serve it under your application’s authenticated origin.
  • Log the HTTP status code and dataStatus.statusDescription together for easier debugging.
  • Demo converts the public GuGuData homepage and caches successful results for 15 minutes. X-GuGuData-Demo-Mode indicates live or cached; X-GuGuData-Generated-At identifies generation time.
  • The response example above illustrates the format; its download address is not a hosted sample. Use the actual URL returned by your request.

FAQ

Where is the official API detail page?

The official detail page is https://gugudata.io/details/url2html. It is the best place to review the latest public endpoint information before publishing or integrating.

Should I handle dataStatus.statusCode as the HTTP status code?

No. Use the HTTP status code for request-level behavior such as authentication, permission, rate limiting, and server errors. Use dataStatus.statusCode only as the response body status field when it is present.

Can I use the demo endpoint in production?

No. The demo endpoint is for quick testing and examples. Use the authenticated endpoint with your appkey for production workflows.

For more developer APIs, visit GuGuData.