Skip to main content

Generate image with QR code

QR Code generator (type text and press enter) https://browsercloud.io/doc-examples/qr-code.html

Get image with QR code only (using "selector" option)

curl -X POST \
https://chrome.browsercloud.io/screenshot?token=API_TOKEN \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '
{
"url": "https://browsercloud.io/doc-examples/qr-code.html",
"addScriptTag" : [
{
"content" : "document.getElementById(\"text\").value = \"QR CODE CONTENT\"; makeCode();"
}
],
"options": {
"type": "png"
},
"selector" : ".output"
}'
ParametersAvailable valuesDescription
urlstringURL for web scraping
waitForstringScript waits certain DOM element to be rendered
addScriptTag.contentstring - js codeAdds custom <script> tag to the page
selectorstring - dom node selectorrender certain DOM node by selector
typepng,jpegimage format
quality1-100available for jpeg only