• Public
  • Public/Protected
  • All

The parameters for requesting and rendering a page. When you submit an array of IPageRequests, they are loaded in-order, and only the last one is rendered. All variables except 'url' are optional.


  • IPageRequest



Optional backend

backend: IBackendType

choose what browser renders your request



Optional content

content: string

if specified, will be used as the content of the page you are loading (no network request will be made for the url). If you do not provide a url] then http://localhost/blank will be used as the target Url for your content.

Alternatively, you can provide a url as the content. This will load the contents of the url and use that as the content string.


{url:"http://example.com/page1",content:"http://example.com/page2", renderType:"png"} //replace the contents of page1 with those of page2 and takes a screenshot


Hello, World!

", renderType:"png"} //loads http://localhost/blank with the contents "

Hello, World!

" and takes a screenshot

Optional outputAsJson

outputAsJson: boolean

TRUE to return the page contents and metadata as a JSON object. see IUserResponse if FALSE, we return the rendered content in it's native form.

Optional renderSettings

renderSettings: IRenderSettings

settings related to rendering of the last page of your request. See the IRenderSettings documentation (below) for details

Optional renderType

renderType: string

"html": returns the html text, "jpeg"|"jpg" : The default. renders page as jpeg. transparency not supported. (use png for transparency), "png": renders page as png, "pdf": renders page as a pdf, "script": returns the contents of window['_pjscMeta'].scriptOutput. see the IScripts parameter for more details, "plainText": return the text without html tags (page plain text),

Optional requestSettings

requestSettings: IRequestSettings

settings related to requesting internet resources (your page and resources referenced by your page)

Optional scriptSettings

scriptSettings: IScriptSettings

new for Chrome backend. (not available on WebKit).. extra settings if you use injected scripts.

Optional scripts

scripts: IScripts

Execute your own custom JavaScript inside the page being loaded. see IScripts docs for more details.

Optional suppressJson

suppressJson: string[]

add the nodes from your pageResponse that you do not wish to transmit. This reduces the size of your data, thus reducing cost and transmission time. if you need the data in these nodes, simply remove it from this array. pass an empty array to return all nodes.


[ "pageResponses.events.value.request.headers", "pageResponses.events.value.response.headers", "pageResponses.frameData.content", "pageResponses.frameData.childFrames" ]


url: string

The target page you wish to load. Either url or content is required.

Optional urlSettings

urlSettings: IUrlSettings

adjustable parameters for when making network requests to the url specified