# request.get

Source: https://docs.scrappey.com/docs/request-get

> Make a GET request through a real browser session with full support for cookies, proxies, local storage, and more.

**Session Timeout:** A session will automatically expire **200 seconds** after the last request.

## Parameters

| Parameter       | Type    | Required | Description                                                                                                                                                                                                                                                  |
| --------------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `url`           | string  | Yes      | The target URL to fetch.                                                                                                                                                                                                                                     |
| `session`       | string  | No       | Use an existing browser session. If not provided, a temporary instance is created and destroyed after the request.                                                                                                                                           |
| `cookiejar`     | array   | No       | Accepts an array of cookie objects to be set before visiting the page. Example: `[{ "name": "cookie1", "value": "value1", "domain": "domain.com", "path": "/" }]`                                                                                            |
| `cookies`       | string  | No       | Raw cookie string to be injected before page load. Example: `_ga=GA1.1.143964650.1682153807; _fbp=fb.1.1711313596391.220282865`                                                                                                                              |
| `proxy`         | string  | No       | Use a custom proxy. Supports `http://`, `socks4://`, or `socks5://`. Authentication is supported. Example: `http://username:password@127.0.0.1:8888`. Ignored if `session` is set — use session-specific proxy in `sessions.create` instead.                 |
| `proxyCountry`  | string  | No       | Select a specific country when using the built-in rotating proxies. Example: `"UnitedStates"`                                                                                                                                                                |
| `customHeaders` | object  | No       | Override default browser headers. Example: `{ "auth": "value" }`                                                                                                                                                                                            |
| `includeImages` | boolean | No       | Set to `true` to return a list of all image URLs found on the page.                                                                                                                                                                                          |
| `includeLinks`  | boolean | No       | Set to `true` to return a list of all hyperlinks found on the page.                                                                                                                                                                                          |
| `requestType`   | string  | No       | Choose between `"browser"` (default full browser) and `"request"` (faster, no rendering). Automatically sets appropriate headers unless `customHeaders` is used.                                                                                             |
| `localStorage`  | object  | No       | Set key-value pairs in the browser's localStorage before loading the page. Example: `{ "ac": "dsjfh84hfdsfk", "onboarding": "false" }`                                                                                                                       |

### Important Note

If you're using a **Cloudflare clearance cookie**, make sure the **User-Agent** used in your headers **exactly matches** the one used during clearance. Mismatched headers will trigger a challenge page.

## Advanced Options

These optional parameters control the output format, browser configuration, and session behavior. They work on `request.get`, `request.post`, and the other request commands.

| Parameter                | Type             | Required | Description                                                                                                                                                              |
| ------------------------ | ---------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `markdown`               | boolean          | No       | Return the page converted to Markdown in `solution.markdown`. Respects `includeImages` / `includeLinks`. Combine with `filter: ["markdown"]` to return only the Markdown. |
| `pdf`                    | boolean          | No       | Render the loaded page to a PDF. The PDF is returned base64-encoded in the response.                                                                                      |
| `pageUrl`                | string           | No       | Page-first fetch: load this URL first to establish a real session and cookies, then fetch the target `url` from within that browser context. Useful when an API endpoint depends on cookies or state established by a normal page visit. |
| `build`                  | string \| array  | No       | Select the browser build: `ff144`, `ff146`, `cl146`, `ff147`, `ff148`, `ff149`, or `ff150`. Pass an array (e.g. `["ff148", "ff150"]`) to select from available browser builds for compatibility testing. Defaults to the newest build. |
| `forceUniqueFingerprint` | boolean          | No       | Use a fresh browser configuration for this request. Useful for compatibility testing and isolated runs. Uses more resources. |
| `webrtcIpv4`             | string           | No       | IPv4 address to align WebRTC network settings with when `forceUniqueFingerprint` is enabled. Defaults to the proxy's IPv4.                                                            |
| `webrtcIpv6`             | string           | No       | IPv6 address to align WebRTC network settings with when `forceUniqueFingerprint` is enabled. Defaults to an IPv6 derived from the proxy, if available.                                |
| `captchaMethod`          | string           | No       | Interactive challenge handling mode when `automaticallySolveCaptchas` is enabled. `"token"` (default) uses the integrated service; `"click"` handles the step interactively within the browser. |
| `overwriteLocale`        | string           | No       | Force `navigator.language`, `navigator.languages`, and the `Accept-Language` header to this locale (e.g. `"en-US"`) instead of auto-detecting it from the proxy IP's country. |

### Return the page as Markdown

```bash
curl -X POST "https://publisher.scrappey.com/api/v1?key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "cmd": "request.get",
    "url": "https://example.com",
    "markdown": true,
    "filter": ["markdown"]
  }'
```

### Return the page as a PDF

```bash
curl -X POST "https://publisher.scrappey.com/api/v1?key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "cmd": "request.get",
    "url": "https://example.com",
    "pdf": true
  }'
```

### Page-first fetch (session warm-up)

Load a normal page to acquire cookies/session, then fetch a protected API endpoint from inside the same browser:

```bash
curl -X POST "https://publisher.scrappey.com/api/v1?key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "cmd": "request.get",
    "url": "https://example.com/api/data",
    "pageUrl": "https://example.com"
  }'
```

### Pin or randomize the browser build

```bash
curl -X POST "https://publisher.scrappey.com/api/v1?key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "cmd": "request.get",
    "url": "https://example.com",
    "build": ["ff148", "ff149", "ff150"]
  }'
```

### Force a unique fingerprint

```bash
curl -X POST "https://publisher.scrappey.com/api/v1?key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "cmd": "request.get",
    "url": "https://example.com",
    "forceUniqueFingerprint": true
  }'
```

### Force a specific locale

```bash
curl -X POST "https://publisher.scrappey.com/api/v1?key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "cmd": "request.get",
    "url": "https://example.com",
    "proxyCountry": "Germany",
    "overwriteLocale": "en-US"
  }'
```

## Request

```json
{
    "cmd": "request.get",
    "url": "https://httpbin.org/get"
}
```

## Response

```json
{
    "solution": {
        "verified": true,
        "currentUrl": "https://httpbin.rs/get",
        "statusCode": 200,
        "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0",
        "innerText": "{\"body_string\":\"\",\"headers\":{\"accept\":\"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\",\"accept-encoding\":\"gzip, br\",\"accept-language\":\"en-US,en;q=0.5\",\"cache-control\":\"no-cache\",\"cdn-loop\":\"cloudflare; loops=1\",\"cf-connecting-ip\":\"161.0.248.139\",\"cf-ipcountry\":\"TT\",\"cf-ray\":\"947fb8313e8fd6db-IAD\",\"cf-visitor\":\"{\\\"scheme\\\":\\\"https\\\"}\",\"host\":\"httpbin.rs\",\"pragma\":\"no-cache\",\"priority\":\"u=0, i\",\"sec-fetch-dest\":\"document\",\"sec-fetch-mode\":\"navigate\",\"sec-fetch-site\":\"none\",\"sec-fetch-user\":\"?1\",\"upgrade-insecure-requests\":\"1\",\"user-agent\":\"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0\",\"x-forwarded-for\":\"161.0.248.139, 172.71.194.68\",\"x-forwarded-host\":\"httpbin.rs\",\"x-forwarded-port\":\"80\",\"x-forwarded-proto\":\"https\",\"x-forwarded-server\":\"ab65c85a31ae\",\"x-is-trusted\":\"yes\",\"x-real-ip\":\"161.0.248.139\"},\"json\":null,\"method\":\"GET\",\"origin\":\"161.0.248.139\",\"query\":null,\"uri\":\"/get\"}",
        "cookies": [],
        "cookieString": "",
        "response": "<html><head><link rel=\"stylesheet\" href=\"resource://content-accessible/plaintext.css\"></head><body><pre>{\"body_string\":\"\",\"headers\":{\"accept\":\"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\",\"accept-encoding\":\"gzip, br\",\"accept-language\":\"en-US,en;q=0.5\",\"cache-control\":\"no-cache\",\"cdn-loop\":\"cloudflare; loops=1\",\"cf-connecting-ip\":\"161.0.248.139\",\"cf-ipcountry\":\"TT\",\"cf-ray\":\"947fb8313e8fd6db-IAD\",\"cf-visitor\":\"{\\\"scheme\\\":\\\"https\\\"}\",\"host\":\"httpbin.rs\",\"pragma\":\"no-cache\",\"priority\":\"u=0, i\",\"sec-fetch-dest\":\"document\",\"sec-fetch-mode\":\"navigate\",\"sec-fetch-site\":\"none\",\"sec-fetch-user\":\"?1\",\"upgrade-insecure-requests\":\"1\",\"user-agent\":\"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0\",\"x-forwarded-for\":\"161.0.248.139, 172.71.194.68\",\"x-forwarded-host\":\"httpbin.rs\",\"x-forwarded-port\":\"80\",\"x-forwarded-proto\":\"https\",\"x-forwarded-server\":\"ab65c85a31ae\",\"x-is-trusted\":\"yes\",\"x-real-ip\":\"161.0.248.139\"},\"json\":null,\"method\":\"GET\",\"origin\":\"161.0.248.139\",\"query\":null,\"uri\":\"/get\"}</pre></body></html>",
        "responseHeaders": {
            "date": "Fri, 30 May 2025 16:48:31 GMT",
            "content-type": "application/json; charset=utf-8",
            "cf-ray": "947fb8313e8fd6db-IAD",
            "server": "cloudflare",
            "content-encoding": "zstd",
            "cf-cache-status": "DYNAMIC",
            "report-to": "{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=vjiHLteAY5BudLpu8FBSR7H1zrEVyMaB3p05NXTLkkFdkMwe2nW7pH2mmR2H1YZX6SnueOYkFzZ%2F6vNoSp9vHy5WiHmX%2FnYJ2SJ%2B3I7eebUZYEefUHJTlkRsbjMD\"}], \"group\":\"cf-nel\", \"max_age\":604800}",
            "nel": "{\"success_fraction\":0, \"report_to\":\"cf-nel\", \"max_age\":604800}",
            "alt-svc": "h3=\":443\"; ma=86400",
            "server-timing": "cfCacheStatus;desc=\"DYNAMIC\", cfL4;desc=\"?proto=TCP&rtt=87643&min_rtt=82738&rtt_var=21002&sent=7&recv=9&lost=0&retrans=0&sent_bytes=3978&recv_bytes=2399&delivery_rate=52499&cwnd=238&unsent_bytes=0&cid=76cb71c0b81a2239&ts=388&x=0\"",
            "x-firefox-spdy": "h2"
        },
        "requestHeaders": {
            "host": "httpbin.rs",
            "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:135.0) Gecko/20100101 Firefox/135.0",
            "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
            "accept-language": "en-US,en;q=0.5",
            "accept-encoding": "gzip, deflate, br, zstd",
            "upgrade-insecure-requests": "1",
            "sec-fetch-dest": "document",
            "sec-fetch-mode": "navigate",
            "sec-fetch-site": "none",
            "sec-fetch-user": "?1",
            "connection": "keep-alive",
            "priority": "u=0, i",
            "pragma": "no-cache",
            "cache-control": "no-cache"
        },
        "ipInfo": {
            "status": "success",
            "country": "Trinidad and Tobago",
            "countryCode": "TT",
            "region": "CHA",
            "regionName": "Chaguanas",
            "city": "Chaguanas",
            "zip": "",
            "lat": 10.5167,
            "lon": -61.4167,
            "timezone": "America/Port_of_Spain",
            "isp": "Columbus Communications Trinidad Limited.",
            "org": "Columbus Communications Trinidad Limited",
            "as": "AS27665 Columbus Communications Trinidad Limited.",
            "mobile": false,
            "proxy": false,
            "hosting": false,
            "query": "161.0.248.139"
        },
        "method": "GET",
        "type": "browser"
    },
    "timeElapsed": 10269,
    "data": "success",
    "session": "06c9de79-a61b-4eae-9121-11814440cc07"
}
```
