← Urlbox.io

Generate Screenshot From URL with Urlbox.io API

Pipedream makes it easy to connect APIs for Urlbox.io and 2,000+ other apps remarkably fast.

Trigger workflow on
HTTP requests, schedules and app events
Next, do this
Generate Screenshot From URL with the Urlbox.io API
No credit card required
Intro to Pipedream
Watch us build a workflow
Watch us build a workflow
4 min
Watch now ➜

Trusted by 800,000+ developers from startups to Fortune 500 companies

Adyen logo
Appcues logo
Bandwidth logo
Checkr logo
ChartMogul logo
Dataminr logo
Gopuff logo
Gorgias logo
LinkedIn logo
Logitech logo
Replicated logo
Rudderstack logo
SAS logo
Scale AI logo
Webflow logo
Warner Bros. logo
Adyen logo
Appcues logo
Bandwidth logo
Checkr logo
ChartMogul logo
Dataminr logo
Gopuff logo
Gorgias logo
LinkedIn logo
Logitech logo
Replicated logo
Rudderstack logo
SAS logo
Scale AI logo
Webflow logo
Warner Bros. logo

Developers Pipedream

Getting Started

Create a workflow to Generate Screenshot From URL with the Urlbox.io API. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Configure the Generate Screenshot From URL action
    1. Connect your Urlbox.io account
    2. Configure URL
    3. Select a Format
    4. Optional- Configure Width
    5. Optional- Configure Height
    6. Optional- Configure Full Page
    7. Optional- Configure Selector
    8. Optional- Configure GPU
    9. Optional- Configure Block Ads
    10. Optional- Configure Block Urls
    11. Optional- Configure Hide Cookie Banners
    12. Optional- Configure Click Accept
    13. Optional- Configure Hide Selector
    14. Optional- Configure JS
    15. Optional- Configure CSS
    16. Optional- Configure Dark Mode
    17. Optional- Configure Retina
    18. Optional- Configure Thumb Width
    19. Optional- Configure Thumb Height
    20. Optional- Configure Quality
    21. Optional- Configure Transparent
    22. Optional- Configure Max Height
    23. Optional- Configure Download
    24. Optional- Select a PDF Page Size
    25. Optional- Configure PDF Page Width
    26. Optional- Configure PDF Page Height
    27. Optional- Select a PDF Margin
    28. Optional- Configure PDF Margin Top
    29. Optional- Configure PDF Margin Right
    30. Optional- Configure PDF Margin Bottom
    31. Optional- Configure PDF Margin Left
    32. Optional- Configure PDF Scale
    33. Optional- Select a PDF Orientation
    34. Optional- Configure PDF Background
    35. Optional- Configure Disable Ligatures
    36. Optional- Select a Media
    37. Optional- Configure Force
    38. Optional- Configure Unique
    39. Optional- Configure ttl
    40. Optional- Configure Proxy
    41. Optional- Configure Header
    42. Optional- Configure Cookie
    43. Optional- Select a User Agent
    44. Optional- Configure Accept Lang
    45. Optional- Configure Authorization
    46. Optional- Configure TZ
    47. Optional- Configure Delay
    48. Optional- Configure Timeout
    49. Optional- Select a Wait Until
    50. Optional- Configure Wait For
    51. Optional- Configure Wait To Leave
    52. Optional- Configure Wait Timeout
    53. Optional- Configure Scroll To
    54. Optional- Configure Click
    55. Optional- Configure Click All
    56. Optional- Configure Hover
    57. Optional- Configure Bg Color
    58. Optional- Configure Disable JS
    59. Optional- Configure Full Width
    60. Optional- Configure Allow Infinite
    61. Optional- Configure Skip Scroll
    62. Optional- Configure Detect Full Height
    63. Optional- Configure Max Section Height
    64. Optional- Configure Scroll Increment
    65. Optional- Configure Scroll Delay
    66. Optional- Configure Turbo
    67. Optional- Configure Highlight
    68. Optional- Configure Highlight Fg
    69. Optional- Configure Highlight Bg
    70. Optional- Configure Latitude
    71. Optional- Configure Longitude
    72. Optional- Configure Accuracy
    73. Optional- Configure Use S3
    74. Optional- Configure S3 Path
    75. Optional- Configure S3 Bucket
    76. Optional- Select a S3 Storage Class
    77. Optional- Configure Fail If Selector Missing
    78. Optional- Configure Fail If Selector Present
    79. Optional- Configure Fail On 4XX
    80. Optional- Configure Fail On 5XX
  2. Select a trigger to run your workflow on HTTP requests, schedules or app events
  3. Deploy the workflow
  4. Send a test event to validate your setup
  5. Turn on the trigger

Integrations

Generate Screenshot From URL with Urlbox.io API on New Requests from HTTP / Webhook API
HTTP / Webhook + Urlbox.io
 
Try it
Generate Screenshot From URL with Urlbox.io API on New Submission from Typeform API
Typeform + Urlbox.io
 
Try it
Generate Screenshot From URL with Urlbox.io API on New Submission (Instant) from Jotform API
Jotform + Urlbox.io
 
Try it
Generate Screenshot From URL with Urlbox.io API on New Custom Webhook Events from Stripe API
Stripe + Urlbox.io
 
Try it
Generate Screenshot From URL with Urlbox.io API on New Scheduled Tasks from Pipedream API
Pipedream + Urlbox.io
 
Try it

Details

This is a pre-built, source-available component from Pipedream's GitHub repo. The component is developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

Generate Screenshot From URL on Urlbox.io
Description:Generate a screenshot of a website provided by a url. [See the docs here](https://www.urlbox.io/docs/examplecode/node)
Version:0.0.2
Key:urlbox_io-generate-screenshot-from-url

Code

import common from "../common/base.mjs";

export default {
  ...common,
  key: "urlbox_io-generate-screenshot-from-url",
  name: "Generate Screenshot From URL",
  description: "Generate a screenshot of a website provided by a url. [See the docs here](https://www.urlbox.io/docs/examplecode/node)",
  version: "0.0.2",
  type: "action",
  props: {
    urlboxIo: common.props.urlboxIo,
    url: {
      propDefinition: [
        common.props.urlboxIo,
        "url",
      ],
    },
    ...common.props,
  },
};

Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
Urlbox.iourlboxIoappThis component uses the Urlbox.io app.
URLurlstring

The URL of the website you want to screenshot.

FormatformatstringSelect a value from the drop down menu:pngjpgavifwebppdfsvghtml
Widthwidthinteger

Viewport width of the browser in pixels. Default is 1280.

Heightheightinteger

Viewport height of the browser in pixels. Default is 1024.

Full PagefullPageboolean

Specify whether to capture the full-length of the website. Default is FALSE.

Selectorselectorstring

Take a screenshot of the element that matches this selector.

GPUgpuboolean

Enable GPU acceleration to render 3D scenes and heavy WebGL content. This is a beta feature and requires pre-approval. Please contact support to enable this feature on your account.

Block AdsblockAdsboolean

Blocks requests from popular advertising networks from loading.

Block UrlsblockUrlsstring

Block requests from specific urls from loading.

Hide Cookie BannershideCookieBannersboolean

Automatically hides cookie banners from most websites.

Click AcceptclickAcceptboolean

Automatically clicks 'Accept' buttons, in order to dismiss popups.

Hide SelectorhideSelectorstring

Hides all elements that match the element selector by setting their style to display:none !important;. Useful for hiding popups.

JSjsstring

Inject (and execute) custom JavaScript on the page.

CSScssstring

Inject custom CSS into the page.

Dark ModedarkModeboolean

Emulate dark mode on websites by setting prefers-color-scheme: dark.

Retinaretinaboolean

Take a 'retina' or high definition screenshot equivalent to setting a device pixel ratio of 2.0 or @2x. Please note that retina screenshots will be double the normal dimensions and will normally take slightly longer to process due to the much bigger image size. Default is FALSE

Thumb WidththumbWidthstring

The width of the generated thumbnail, in pixels. Omit for a full-size screenshot.

Thumb HeightthumbHeightstring

The height of the generated thumbnail, in pixels. Omit for a full-size screenshot.

Qualityqualityinteger

The image quality of the resulting screenshot (JPEG/WebP only). Default is 80.

Transparenttransparentboolean

If a website has no background color set, the image will have a transparent background (PNG/WebP only).

Max HeightmaxHeightstring

For extremely lengthy websites, it may be preferable to limit the screenshot to a maximum height to prevent Urlbox from spending time scrolling and generating an enormous screenshot.

Downloaddownloadstring

Pass in a filename which sets the content-disposition header on the response. E.g. download=myfilename.png This will make the Urlbox link downloadable, and will prompt the user to save the file as myfilename.png

PDF Page SizepdfPageSizestringSelect a value from the drop down menu:A0A1A2A3A4A5A6LegalLetterLedgerTabloid
PDF Page WidthpdfPageWidthinteger

Sets the PDF page width, in pixels.

PDF Page HeightpdfPageHeightinteger

Sets the PDF page height, in pixels.

PDF MarginpdfMarginstringSelect a value from the drop down menu:nonedefaultminimum
PDF Margin ToppdfMarginTopinteger

Sets a custom top margin on the PDF.

PDF Margin RightpdfMarginRightinteger

Sets a custom right margin on the PDF.

PDF Margin BottompdfMarginBottominteger

Sets a custom bottom margin on the PDF.

PDF Margin LeftpdfMarginLeftinteger

Sets a custom left margin on the PDF.

PDF ScalepdfScalestring

Sets the scale factor of the website content in the PDF. Valid values are numbers between 0.1 and 2. Default is 1

PDF OrientationpdfOrientationstringSelect a value from the drop down menu:portraitlandscape
PDF BackgroundpdfBackgroundboolean

Sets whether to print background images in the PDF.

Disable LigaturesdisableLigaturesboolean

Prevents ligatures from being used. Useful when rendering a PDF, and you want to extract text which contains ligatures.

MediamediastringSelect a value from the drop down menu:printscreen
Forceforceboolean

Generate a fresh screenshot or PDF, instead of getting a cached version.

Uniqueuniquestring

Pass a unique string such as a UUID, hash or timestamp, to have more control over when to generate a fresh screenshot or PDF. For example, you could do something like unique=$1681161683702 to get a new value for unique each time it is called.

ttlttlinteger

Short for 'time to live'. Number of seconds to keep a screenshot in the cache. Note the default is also the maximum value for this option. Default is 2592000 (30 days - this is also the maximum value).

Proxyproxystring

Pass in a proxy server address to make screenshot requests via that server in the format [address]:[port]. If proxy authentication is required, you can use the following format: [user]:[password]@[address]:[port].

Headerheaderstring

Set a header on the request when loading the URL. Example: To set the header with key X-My-Header to the value SomeValue, you would pass header=X-My-Header%3DSomeValue. This can be set multiple times, to set more than one header - e.g. header=X-My-Header%3DSomeValue&header=X-My-Other-Header%3DSomeOtherValue. As with all options passed via the query string, the header value must be URL encoded - so X-My-Header=SomeValue becomes X-My-Header%3DSomeValue in order to be interpreted correctly by Urlbox.

Cookiecookiestring

Sets a cookie on the request when loading the URL. Example: To set the cookie with key Opt-In to the value yes, you would pass cookie=Opt-In%3Dyes. This can be set multiple times, to set more than one cookie - e.g.cookie=Opt-In%3Dyes&cookie=Session-Id%3DMTIzNDU. As with all options passed in the query string, the cookie value must be URL encoded - so OptIn=true becomes OptIn%3Dtrue in order to be interpreted correctly by Urlbox.

User AgentuserAgentstringSelect a value from the drop down menu:randommobiledesktopGooglebot/2.1 (+http://www.google.com/bot.html)facebookexternalhit/1.1
Accept LangacceptLangstring

Sets an Accept-Language header on requests to the target URL. Default is en-US.

Authorizationauthorizationstring

Sets an Authorization header on requests to the target URL. Can be used to pass an auth token through to the site in order to 'login' before rendering.

TZtzstring

Sets the local timezone to use for the screenshot. Default is UTC

Delaydelaystring

Amount of time to wait in milliseconds before urlbox takes the screenshot.

Timeouttimeoutinteger

Amount of time to wait in milliseconds for the website at url to respond. Default is 30000.

Wait UntilwaitUntilstringSelect a value from the drop down menu:downloadedmostrequestfinishedrequestsfinishedloaded
Wait ForwaitForstring

Waits for the element specified by this selector to be present in the DOM before taking a screenshot or pdf. By default, Urlbox will take a screenshot or PDF if the wait_for element is not found after waiting for the time specified by the wait_timeout option. If you prefer Urlbox to fail the request when the wait_for element is not found, pass fail_if_selector_missing=true

Wait To LeavewaitToLeavestring

Waits for the element specified by this selector to be absent from the DOM before taking a screenshot or PDF. A typical use-case would be waiting for loading spinners to be absent before taking a screenshot. By default, Urlbox will take a screenshot or PDF if the wait_to_leave element is still present after the time specified by the wait_timeout option. If you prefer Urlbox to fail the request when the wait_to_leave element is still present, pass fail_if_selector_present=true

Wait TimeoutwaitTimeoutinteger

The amount of time to wait for the wait_for element to be available before continuing, in milliseconds. Default is 30000 (30 seconds)

Scroll Toscrolltostring

Scroll, to either an element or to a pixel offset from the top, before taking a screenshot of PDF.

Clickclickstring

Specifies an element selector to click before generating a screenshot or PDF. Example: #clickme would click an element with id="clickme". Can be used multiple times to simulate multiple sequential click events. If the selector matches multiple elements, only the first element will be clicked.

Click AllclickAllstring

Specifies an element selector to click before generating a screenshot or PDF. Example: .clickme would click all elements with class="clickme". Can be used multiple times to simulate multiple sequential click events. If the selector matches multiple elements, all elements will be clicked.

Hoverhoverstring

Specifies an element selector to hover over before generating a screenshot or PDF. Example: #hoverme would hover over the element with id="clickme".

Bg ColorbgColorstring

Specify a hex code or CSS color string to use as the background color. Some websites don't set a body background colour, and will show up as transparent backgrounds with PNG, or black when using JPG. Use this setting to set a background colour. If the website explicitly sets a transparent background on the html or body elements, this setting will be overridden.

Disable JSdisable_jsboolean

Turn off javascript on target url to prevent popups. Enabling this option will prevent full_page=true and many other options, because having javascript disabled prevents Urlbox from evaluating code inside the page's context.

Full WidthfullWidthboolean

When full_page=true, specify whether to capture the full width of the website, for example if the site is horizontally scrolling.

Allow InfiniteallowInfiniteboolean

By default, when Urlbox detects an infinite scrolling page, it does not attempt to continue scrolling to the bottom, as this could result in infinite scrolling! If you want to override this behaviour, pass true for this option.

Skip ScrollskipScrollboolean

Enabling skip_scroll will speed up renders by skipping an initial scroll through the page, which is used to trigger any lazy loading elements.

Detect Full HeightdetectFullHeightstring

Some pages have full-height backgrounds whose heights are set to 100% of the viewport. This can cause the backgrounds to get stretched when making a full page screenshot. If you are seeing this behaviour in your full page screenshots, pass true for this option.

Max Section HeightmaxSectionHeightinteger

When Urlbox takes a full_page screenshot, the maximum height of each image section is set to 4096 pixels. If a sites height is greater than this value, Urlbox will start splitting the screenshot into sections. Sometimes it is worthwhile experimenting with this number. Default is 4096.

Scroll IncrementscrollIncrementstring

Sets how many pixels to scroll when scrolling the page to trigger lazy loading elements. By default, the scroll increment is set to the browser viewport height. Some pages' lazy loading elements only trigger when the scroll increment is smaller than this, however, e.g. 400px.

Scroll DelayscrollDelaystring

When Urlbox decides to split a screenshot into multiple sections, the scroll delay is the time to wait between taking the screenshots of each individual section, in milliseconds. While Urlbox does detect animations, and attempts to wait for them before taking a screenshot, this option could be used to force Urlbox to wait for a certain amount of time after scrolling to the next section, to wait for things like animations to finish.

Turboturbostring

Warning This is an experimental option. Used to speed up full page screenshots, but at the expense of accuracy.

Highlighthighlightstring

Word to highlight on the page before capturing a screenshot.

Highlight Fghighlightfgstring

Text color of the highlighted word. Default is white.

Highlight Bghighlightbgstring

Background color of the highlighted word. Default is red.

Latitudelatitudestring

Sets the latitude used to emulate the Geolocation API.

Longitudelongitudestring

Sets the longitude used to emulate the Geolocation API.

Accuracyaccuracystring

Sets the accurate of the Geolocation API, in metres.

Use S3useS3boolean

Save the screenshot directly to the S3 bucket configured on your account.

S3 Paths3Pathstring

Sets the S3 path, including subdirectories and the filename, to use when saving the screenshot in your S3 bucket. The extension (.png, .jpg or .pdf) will be provided automatically, and should not be included in s3_path.

S3 Buckets3Bucketstring

Overrides the configured S3 bucket to use when saving the screenshot.

S3 Storage Classs3StorageClassstringSelect a value from the drop down menu:standardstandard_iareduced_redundancyonezone_iaintelligent_tieringglacierdeep_archiveoutposts
Fail If Selector MissingfailIfSelectorMissingboolean

Fails the request if the elements specified by selector or wait_for options are not found on the page after waiting for wait_timeout.

Fail If Selector PresentfailIfSelectorPresentboolean

Fails the request if the element specified by wait_to_leave option is found on the page after waiting for wait_timeout.

Fail On 4XXfailOn4xxboolean

If fail_on_4xx=true and the requested URL returns a status code between 400 and 499, Urlbox will fail the request with error code 400 and the message: Failed to render. Requested URL returned a 4xx error code and fail_on_4xx was true.

Fail On 5XXfailOn5xxboolean

If fail_on_5xx=true and the requested URL returns a status code between 500 and 599, Urlbox will fail the request with error code 400 and message: Failed to render. Requested URL returned a 5xx error code and fail_on_5xx was true.

Authentication

Urlbox.io uses API keys for authentication. When you connect your Urlbox.io account, Pipedream securely stores the keys so you can easily authenticate to Urlbox.io APIs in both code and no-code steps.

Sign in and copy your API key from the Projects page.

About Urlbox.io

The Screenshot API You Can Depend On. Since 2012, Urlbox has replaced unreliable, inaccurate and inconsistent screenshot APIs for developers like you.

More Ways to Use Urlbox.io

Actions

Generate Screenshot From HTML with the Urlbox.io API

Generate a screenshot of a website provided by a html. See the docs here

 
Try it

Explore Other Apps

1
-
24
of
2,000+
apps by most popular

HTTP / Webhook
HTTP / Webhook
Get a unique URL where you can send HTTP or webhook requests
Notion
Notion
Notion is a new tool that blends your everyday work apps into one. It's the all-in-one workspace for you and your team.
OpenAI (ChatGPT)
OpenAI (ChatGPT)
OpenAI is an AI research and deployment company with the mission to ensure that artificial general intelligence benefits all of humanity. They are the makers of popular models like ChatGPT, DALL-E, and Whisper.
Schedule
Schedule
Trigger workflows on an interval or cron schedule.
Google Drive
Google Drive
Google Drive is a file storage and synchronization service which allows you to create and share your work online, and access your documents from anywhere.
Google Sheets
Google Sheets
Use Google Sheets to create and edit online spreadsheets. Get insights together with secure sharing in real-time and from any device.
Filter
Filter
Specify a condition that your workflow must meet and whether you'd like to proceed or end workflow execution.
Python
Python
Anything you can do in Python can be done in a Pipedream Workflow. This includes using any of the 350,000+ PyPi packages available in your Python powered workflows.
Slack
Slack
Slack is a channel-based messaging platform. With Slack, people can work together more effectively, connect all their software tools and services, and find the information they need to do their best work — all within a secure, enterprise-grade environment.
Data Stores
Data Stores
Use Pipedream Data Stores to manage state throughout your workflows.
GitHub
GitHub
Where the world builds software. Millions of developers and companies build, ship, and maintain their software on GitHub—the largest and most advanced development platform in the world.
Formatting
Formatting
Pre-built actions to make formatting and manipulating data within your workflows easier.
Node
Node
Anything you can do with Node.js, you can do in a Pipedream workflow. This includes using most of npm's 400,000+ packages.
Airtable (OAuth)
Airtable (OAuth)
Airtable is a low-code platform to build next-gen apps. Move beyond rigid tools, operationalize your critical data, and reimagine workflows with AI.
Zoom
Zoom
Zoom is the leader in modern enterprise video communications, with an easy, reliable cloud platform for video and audio conferencing, chat, and webinars.
Google Calendar
Google Calendar
With Google Calendar, you can quickly schedule meetings and events and get reminders about upcoming activities, so you always know what’s next.
Gmail
Gmail
Gmail offers private and secure email by Google at no cost, for business and consumer accounts.
Gmail (Developer App)
Gmail (Developer App)
Private and secure email by Google at no cost, for business and consumer accounts. Use this app to connect your own developer account credentials.
Email
Email
Trigger workflows on new emails, and send emails to yourself as part of a Pipedream workflow.
Delay
Delay
Delay, pause, suspend, or have the execution of your workflow wait for as little as one millisecond, or as long as one year.
Go
Go
Anything you can do in Go, you can do in a Pipedream Workflow. You can use any of Go packages available with a simple import.
Premium
Zoom Admin
Zoom Admin
Video conferencing (includes account-level scopes) for Zoom Admins.
Twilio
Twilio
Twilio is a cloud communications platform for building SMS, Voice & Messaging applications on an API built for global scale.
Bash
Bash
Run any Bash in a Pipedream step within your workflow, including making curl requests.