URL Screenshots

If you have ever needed to capture the content of a web page and struggled to find a quick and efficient way to do it, Filestack now provides a solution for this problem. Pass Filestack's transformation engine a URL and it will convert the entire web page into an image.


Note: The url screenshot task will not work for content that is located in areas that require you to login. If the content is not publicly visible, then it will not be captured.

URL Screenshots

URL Screenshot Task URL Format:
https://process.filestackapi.com/<API_KEY>/urlscreenshot=[options]/URL_to_be_captured
urlscreenshot
String

Root task cannot be abbreviated

Users can use urlscreenshot without any options and the default settings will be used.
urlscreenshot=agent:desktop or mobile
String

Can be abbreviated as a:desktop

Determines whether URL Screenshot captures the desktop or mobile version of the specified website.
urlscreenshot=mode:all or window
String

Can be abbreviated as m:window

Specify the portion of the website you wish to capture. mode:window will capture only the part of the site visible in the window. mode:all will capture the entire page.
urlscreenshot=width:1 to 1920
Integer

Can be abbreviated as w:1920

Designate the width of the browser window. The width is 1024 by default, but can be set to anywhere between 1 to 1920. Depending on whether the target site uses media queries or user-agents to control its mobile-responsiveness this parameter will produce different results.
urlscreenshot=height:1 to 1080
Integer

Can be abbreviated as h:1080

Designate the height of the browser window. The height is 768 by default, but can be set to anywhere between 1 to 1080. Depending on whether the target site uses media queries or user-agents to control its mobile-responsiveness this parameter will produce different results.
urlscreenshot=delay=3000 (time in milliseconds)
Integer

Can be abbreviated as d:3000

Tell URL Screenshot to wait x milliseconds before capturing the webpage. Sometimes pages take longer to load, so you may need to delay the capture in order to make sure the page is rendered before the screenshot is taken. The delay must be an integer between 0 and 10000.

URL Screenshot Examples

Displaying and resizing the resulting screenshot to a height of 500px: /urlscreenshot/resize=height:500/

the wikipedia main page captured in jpeg form using Filestack's url screenshot transformation task

Using the Agent Parameter

If a page offers a mobile mode, the screenshot function will sometimes default to mobile view. By switching the user agent, you can effect the output.

Displaying and resizing the resulting desktop agent screenshot to a height of 750px: /urlscreenshot=agent:desktop/resize=h:750/

the wikipedia page for ASD in desktop mode captured in jpeg form using Filestack's url screenshot transformation task

Displaying and resizing the resulting mobile agent screenshot to a height of 750px: /urlscreenshot=agent:mobile/resize=h:750/

the wikipedia page for ASD in mobile mode captured in jpeg form using Filestack's url screenshot transformation task

Using the Height and Width Parameters

Displaying and resizing the resulting 500 x 500 screenshot: /urlscreenshot=mode:window,height:500,width:500/

the wikipedia main page in desktop mode captured in jpeg form using Filestack's url screenshot transformation task

Using the Mode Parameter

Displaying the resulting screenshot using mode:window:

The returned image is only what appears inside of the browser window.

A large and helpful list of mimetypes captured using Filestack's url screenshot function

Displaying and resizing the resulting screenshot using mode:all to a height of 1750px:

This demonstrates that the url screenshot function can capture very long pages. If displayed at full resolution, the image would be 1024x6591

A large and helpful list of mimetypes captured using Filestack's url screenshot function