choose what browser renders your request
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.
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.
This api allows unparalleled control over your browser request. Using this Automation API you will be able to do the following things easily:
ES2018
javascript) execution inside your API call. This enables dynamic query/manipulation of the page. Full control over the browser.See the Automation API Docs for more details.
renderType:"automation"
to display only your automation output.shortcut for using our builtin proxy service. Please use IUserRequest.proxy
for full configuration options ( IProxyOptions )
Geolocation using Static IP Costs an additional $0.25/gb ingress.
geo-us
" all your requests use a single, static IP (35.188.112.61
) from the USA.Anonymous Proxy Costs an additional $0.50/gb ingress
anon-{country-code}
" Each request uses a different, anonymous IP address. Choose any
for the largest selection of IP addresses from anywhere in the world.
Other choices include cn
(China), nl
(Netherlands), us
(USA). Please see http://phantomjscloud.com/examples/helpers/proxy-builtin-locations for a complete list.Custom Proxy No additional cost.
custom-{proxyUrl}:{port}:{username}:{password}
" Use a 3rd party proxy of your own choice. username and password are optional.use JSONata
to query the userResponse object. Used in conjunction with suppressJson this allows you to reduce outputAsJson verbosity and only return the data you want.
You may pass multiple queries (comma delimited string array of queries). Each query's result will be appended to the IUserResponse.queryJson node.
See http://jsonata.org/ for how to create your own custom query
settings related to rendering of the last page of your request. See the IRenderSettings documentation (below) for details
html
: returns the html text,
jpeg
| jpg
: The default. renders page as jpeg. transparency not supported. (use png
for transparency). Max height/width is 20000px. If you need bigger, let support@phantomjscloud.com know. ,
png
: renders page as png. Max default height/width is 10000
px. If you need bigger, set IRenderSettings.clipRectangle or IRenderSettings.selector directly (such as renderSettings.selector:"body"
). ,
pdf
: renders page as a pdf,
script
: DEPRECATED: use the new Automation API instead. returns the contents of window['_pjscMeta'].scriptOutput
. see the IScripts parameter for more details,
plainText
: return the text without html tags (page plain text),
automation
: NEW output only the results from the automation IPageRequest.overseerScript. See IAutomationResult for a description of this JSON output. If you set <a href="ipagerequest.html#outputasjson">outputAsJson</a>:true
,
automation Results will always be found under IPageResponse.automation but if renderType:"automation"
is set, userResponse.content.data
will also be set to the IAutomationResult json.
settings related to requesting internet resources (your page and resources referenced by your page)
new for Chrome
backend. (not available on WebKit
).. extra settings if you use injected scripts
.
Execute your own custom JavaScript inside the page being loaded.
see IScripts
docs for more details.
add the nodes from your pageResponse that you do not wish to transmit. Used in conjunction with queryJson this allows you to reduce outputAsJson verbosity and only return the data you want, 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.
important: do not suppress the "meta"
node. However you can suppress "meta.trace"
if you wish.
The target page you wish to load. Either url or content is required.
adjustable parameters for when making network requests to the url specified.
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.