API features
HTML and webpage input
Create a PDF from application-generated HTML or from a complete public HTTP(S) webpage URL.
Portrait or landscape A4 output
Choose the page orientation that best fits reports, tables, forms, and printable records.
Styled document rendering
Preserve supported HTML, CSS, and page backgrounds for presentation-ready output.
Downloadable HTTPS file
Receive a public PDF URL that applications can download, store, share, or attach to another workflow.
Business document generation
Produce invoices, receipts, statements, reports, confirmations, and approval documents.
Webpage archiving
Capture public pages as fixed-layout PDF records for review, compliance, and historical reference.
API Document
HTTP Protocol:HTTPS
HTTP Method:POST
HTTP Endpoint:https://api.gugudata.io/v1/imagerecognition/html2pdf
Response Type:application/json; charset=utf-8
DEMO Endpoint:https://api.gugudata.io/v1/imagerecognition/html2pdf/demo
Live Demo:Try Interactive Demo
Postman Collection:Run in Postman
API Request Parameters
| Name | Type | Is Required | Default Value | Remark |
|---|---|---|---|---|
| appkey | string | true | YOUR_APPKEY | API key used to authenticate the request. |
| type | string | true | html | Input type: html for raw HTML or url for a public webpage. |
| content | string | true | <html><body><h1>Quarterly report</h1></body></html> | Raw HTML up to 5 MiB, or a complete public HTTP or HTTPS URL up to 2,048 characters. |
| landscape | integer | false | 0 | Set to 1 for landscape orientation or 0 for portrait orientation. |
API Response Parameters
| Name | Type | Remark |
|---|---|---|
| pdfPath | string | Public HTTPS URL of the generated PDF file. |
API Response Status Codes
| Status Code | Explanation of Status Code | Remarks |
|---|---|---|
| 200 | Request processed successfully. | Some endpoints expose a separate application-level status field in the response body, such as `dataStatus.statusCode`. |
| 400 | Invalid request parameters or request format. | Check required fields, data types, and request body format. |
| 401 | Missing or unknown application key. | Provide a valid `appkey` with the request. |
| 403 | The application key is recognized but access is not allowed. | The key may be expired, inactive, or not permitted for the requested API. |
| 429 | Request rate or trial usage limit exceeded. | Reduce request frequency and retry with backoff. If a trial allowance is exhausted, check Trial Keys for remaining requests and subscribe to continue. |
| 500 | Internal service error. | Retry later or contact support if the error persists. |
| 503 | Upstream service unavailable. | Retry later; the requested upstream dependency is temporarily unavailable. |
Remote MCP
Use this API through GuGuData Remote MCP
Connect your AI client once, authorize in the browser, and the client can use the GuGuData API tools available to your account. You do not need to paste an appkey into the MCP client.
https://mcp.gugudata.io/mcp{
"mcpServers": {
"gugudata": {
"url": "https://mcp.gugudata.io/mcp",
"transportType": "streamable-http"
}
}
}Code Snippets
HTML to PDF
Submit HTML for a report or a public URL, then save the PDF returned by the API.
Input and coverage: HTML inputs support up to 5 MiB; URL inputs up to 2048 characters. Keep access to your input and save the returned PDF.
Example request
Replace YOUR_APPKEY with your own API key. This request uses the normal API endpoint.
curl --fail-with-body 'https://api.gugudata.io/v1/imagerecognition/html2pdf?appkey=YOUR_APPKEY' \
--request POST \
--header 'Content-Type: application/json' \
--data '{"type": "html", "content": "<html><body><h1>Quarterly report</h1><p>Prepared for review.</p></body></html>", "landscape": 0}'View sample Demo response
This is a fixed Demo sample, shortened for readability. It is not the response to your example request. Your results depend on the input and dataset. File URLs are temporary and have been removed.
{
"dataStatus": {
"statusCode": 200,
"status": "SUCCESS",
"statusDescription": "successfully",
"dataTotalCount": 1
},
"data": {
"pdfPath": "<temporary PDF URL>"
}
}Frequently asked questions
Common questions about request limits, trials, renewal, and cancellation.
What does the 5 requests per second limit mean?
It is a request-rate limit, not a concurrency allowance. Keep your request rate at or below 5 per second. If the service returns a rate-limit response, reduce the frequency and retry with backoff.
Is total paid usage limited?
There is no total request cap during an active paid subscription and no usage-based overage charge.
How does the free trial work?
Each account can receive a limited trial key. Requests are shared across APIs in the same category. Check Trial Keys for the exact allowance and remaining requests.
How do renewal and cancellation work?
The plan renews annually until canceled. Manage or cancel the renewal from Dashboard → Orders & Billing. Access continues through the paid period after cancellation. See the Terms of Service for the current refund policy. If the billing portal is unavailable, contact support.
Service terms
Read our service terms and privacy policy before subscribing.




