URL to PDF
Render a public web page into a production-ready PDF.
POST
/v1/convert/urlFREE+Scope:
convert:writePOST /api/pdf/v1/convert/url ยท x-api-key authenticationcurl --request POST \
--url /api/pdf/v1/convert/url \
--header "x-api-key: $PDF_API_KEY" \
--header "content-type: application/json" \
--data '{"url": "..."}'JavaScript / Node.js
const response = await fetch("/api/pdf/v1/convert/url", { method: "POST", headers: { "x-api-key": process.env.PDF_API_KEY, "content-type": "application/json" }, body: JSON.stringify({ "url": "..." }) });Python
import requests
requests.post("/api/pdf/v1/convert/url", headers={"x-api-key": API_KEY}, json={"url": "..."})PHP
$ch = curl_init("/api/pdf/v1/convert/url");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-api-key: " . getenv("PDF_API_KEY"), "content-type: application/json"]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["url" => "..."]));Go
req, _ := http.NewRequest("POST", "/api/pdf/v1/convert/url", bytes.NewBufferString(`{"url":"..."}`))
req.Header.Set("x-api-key", os.Getenv("PDF_API_KEY"))Developer guide
API usage
Use your API key in the x-api-key header.
curl --request POST \
--url https://api.pdfapi.eu/v1/convert/url \
--header "x-api-key: $PDF_API_KEY" \
--header "content-type: application/json" \
--data '{ "url": "..." }'Responseapplication/pdf