# Getting Started

Browserlify provides Headless Chrome on demand, Headless Chrome (opens new window) is suitable for page format conversion, automated testing or web crawling, three ways to access the hosted Headless Chrome service

  • WebPage Convert Convert WebPage to target format through URL address, you can convert PDF or image
  • Chrome DevTools Protocol (opens new window) Popular puppeteer, Playwright, Selenium can use our service directly
  • Workflow With the amazing Workflow IDE, you can configure browser actions without coding skills and access the configured Workflow with API

Before start, you need an API Token to access the service, and a token will be created for free after registration.

Ok, Let's get party started.

# PDF Generation

Regular PDF generation:

  1. Open https://example.org
  2. Wait document dom loaded
  3. Generate PDF document with Letter(8.5 x 11 inches) size.

Copy the code below, and modify YOUR_TOKEN of your application, it will work

curl -X POST https://api.browserlify.com/pdf?token=YOUR_TOKEN \
    -H 'Content-Type: application/json' \
    --output example.org.pdf \
    -d '{
    "url": "https://example.org",
    "waitLoad": 5000,
    "page": "letter",
}'

See more parameters, Also provides a GUI Console to compositing parameters.

# Screenshot

Take screenshots of web pages, similar to PDF:

curl -X POST \
    https://api.browserlify.com/screenshot?token=YOUR_TOKEN \
    -H 'Content-Type: application/json' \
    --output example.org.png \
    -d '{
    "url": "https://example.org",
    "waitLoad": 5000,
    "fullPage": true,
    "device": "hidpi",
    "quality": 85,
    "format": "png"
}'

See more parameters, Also provides a GUI Console to compositing parameters.

The next step is to call the service with the popular Puppeteer.