Headless Chrome provides a great way to take screenshots or images of raw HTML or a URL of a website. If you need to do this at scale with an easy to use API, we’ve got you covered. We provide a super simple API that allows you to generate these website screenshots with a single POST or GET request.
If you are looking for the most basic, path of least resistance approach to grabbing screenshots of websites, it is probably easiest to use our GET request.
Make a GET request to the following URL, and replace the {UrlToConvert} and {YourApiKey} with the url to the website you want a screenshot of and your api2pdf.com API key respectively. If you need an API key, you can grab it here.
https://v2.api2pdf.com/chrome/image/url?url={UrlToConvert}&apikey={YourApiKey}
If you are looking to pass in HTML and convert that to an image, you can make a POST call to
https://v2.api2pdf.com/chrome/image/html
with the following headers:
authorization: YOUR-API-KEY
accept: application/json
and json payload:
{ “html”: “<p>Hello World</p>” }
We offer so many more options as the API is built on top of puppeteer. Check out the full documentation here:
https://app.swaggerhub.com/apis-docs/api2pdf/api2pdf/2.0.0-beta
Tags: html to image, html to image api, html to image c#, html to image docker, html to image headless chrome, html to image nodejs, html to image python, html to png api, html to png c#, html to png headless chrome, html to png python, screenshot api, url to image, url to image api, url to image docker, url to image headless chrome, url to image nodejs, url to image python, url to png api, url to png docker, url to png headless chrome, url to png python, website to image api
Comments are closed.