Custom headers

Send your own specified headers, including cookies

You can pass custom headers by using the headers parameter and specifying the headers in a dictionary, where each key represents the header name and its corresponding value represents the header value

To use your cookies in a request you can pass an array of dictionaries, where each dictionary represents a single cookie with a "key" and a "value" key-value pair

Below are code examples using 2 custom cookies, as well as 2 headers, all of which you can customize:

curl -X POST -u username:password -H 'Content-Type: application/json' -d '{"target": "universal", "url": "", "geo": "United States", "headless": "html", "cookies": [{"key": "my_cookie", "value": "delicious"}, {"key": "second_cookie", "value": "delisheshner"}], "headers": {"Accept-Language": "en-US", "My-Header": "whatever you can imagine"}}'
import requests

payload = {
    'target': 'universal',
    'url': '',
    'geo': 'United States',
    'headless': 'html',
    'cookies': [{'key': 'my_cookie', 'value': 'delicious'}, {'key': 'another_cookie', 'value': 'delisheshner'}],
    'headers': {'Accept-Language': 'en-US', 'My-Header': 'whatever you can imagine'}

response = requests.request(
    auth=('username', 'password'),

$payload = array(
    'target' => 'universal',
    'url' => '',
    'headless' => 'html',
    'cookies' => array(array('key' => 'my_cookie', 'value' => 'delicious'), array('key' => 'second_cookie', 'value' => 'delisheshner')),
    'headers' => array('Accept-Language' => 'en-US', 'My-Header' => 'whatever you can imagine')

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, '');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_USERPWD, 'username:password');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));

$response = curl_exec($ch);

echo $response;