Skip to main content

proxy

Proxies requests, by a specified set of conditions, through either the Browserless residential proxy or through an external proxy. Only requests that match these conditions are proxies and the rest are sent from the instance's own IP address.

Use the "server" argument to specify an external proxy for Browserless to use for requests. For requests with authentication, the username and password should be included in the URL using Basic Authentication. See the examples below for more information on how to format those URLs.

Using the browserless proxy for all requests and proxy through Brazil

proxy(
url: "*"
country: BR
) {
time
}

Using an external proxy for all requests

proxy(
url: "*"
server: "http://username:password@my-proxy.com:12321"
) {
time
}

Using the Browserless proxy for only document requests and proxying through France

proxy(
url: "*"
type: Document
country: FR
) {
time
}
proxy(
server: String!
method: [Method]
operator: OperatorTypes = or
type: [ResourceType]
url: [String]
): ProxyResponse

Arguments

proxy.server ● String! non-null scalar

An external proxy to use for these requests matching the specified patterns set in the other arguments

proxy.method ● [Method] list enum

The Method(s) of the request you'd like to proxy

proxy.operator ● OperatorTypes enum

Whether to "or" conditions together, meaning any condition that matches will be proxied, or "and" them together meaning every condition must match to proxy the request.

proxy.type ● [ResourceType] list enum

The content-type of the request you'd like to proxy requests to

proxy.url ● [String] list scalar

A glob-style URL pattern to match requests, and if matched, are proxied through

Type

ProxyResponse object

Response returned after setting up the proxy patterns