# Direct Request

Source: https://docs.scrappey.com/docs/direct-http-request

> A lightweight HTTP GET request with browser-compatible TLS settings — useful when full rendering is unnecessary.

## Command

`"cmd": "request.get"`, `"requestType": "request"`

## Cost

**0.2 credit(s)** per successful request.

## Description

This is a raw HTTP `GET` request that **does not launch a browser**. It uses a TLS fingerprint to imitate a real browser. It's useful for fast and cost-effective scraping when browser-based rendering is overkill.

### Pros

* Very **fast** (avg. ~5 seconds)
* Very **cheap** (0.2 credits per request)
* Low **resource usage**
* Low **proxy consumption**
* Good for **simple websites** and **API endpoints**

### Cons

* Cannot interact with the browser
* Cannot handle **advanced anti-bot protection**
* Not suitable for **JavaScript-heavy** or **SPA** sites
* Some sites may detect the request as bot traffic

## When to Use

Use `request.get` with `"requestType": "request"` when:

* The website doesn't require JavaScript rendering
* Speed and cost are more important than complexity
* You don't need to interact with the page (no clicking, scrolling, etc.)
* You're accessing simple data, APIs, or static HTML pages

For more complex sites that use JavaScript or heavy anti-bot techniques, consider switching to a full browser-based `request.get` without `"requestType": "request"`.

## Example

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

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

## Response

```json
{
    "solution": {
        "verified": true,
        "statusCode": 200,
        "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0",
        "cookies": [],
        "response": "{\"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\",\"cdn-loop\":\"cloudflare; loops=1\",\"cf-connecting-ip\":\"119.18.77.197\",\"cf-ipcountry\":\"KR\",\"cf-ray\":\"947fd38f3f33aa5f-ICN\",\"cf-visitor\":\"{\\\"scheme\\\":\\\"https\\\"}\",\"dnt\":\"1\",\"host\":\"httpbin.rs\",\"priority\":\"u=0, i\",\"sec-fetch-dest\":\"document\",\"sec-fetch-mode\":\"navigate\",\"sec-fetch-site\":\"same-site\",\"sec-fetch-user\":\"?1\",\"upgrade-insecure-requests\":\"1\",\"user-agent\":\"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0\",\"x-forwarded-for\":\"119.18.77.197, 172.71.110.86\",\"x-forwarded-host\":\"httpbin.rs\",\"x-forwarded-port\":\"80\",\"x-forwarded-proto\":\"https\",\"x-forwarded-server\":\"ab65c85a31ae\",\"x-is-trusted\":\"yes\",\"x-real-ip\":\"119.18.77.197\"},\"json\":null,\"method\":\"GET\",\"origin\":\"119.18.77.197\",\"query\":null,\"uri\":\"/get\"}",
        "responseHeaders": {
            "alt-svc": "h3=\":443\"; ma=86400",
            "cf-cache-status": "DYNAMIC",
            "cf-ray": "947fd38f3f33aa5f-ICN",
            "content-encoding": "zstd",
            "content-type": "application/json; charset=utf-8",
            "date": "Fri, 30 May 2025 17:07:12 GMT",
            "nel": "{\"success_fraction\":0,\"report_to\":\"cf-nel\",\"max_age\":604800}",
            "report-to": "{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=HlXrquVBA%2BxOKRRHKkaWp%2FycU5igGEA2wtg5FIADowjVuesxwuAvZeZP%2FLANqbbGdvFOdkeImdOJsUO%2FS4LRLdVhgaz22cfqa4a0519XznkoSFmBbMdAebMvtkBk\"}],\"group\":\"cf-nel\",\"max_age\":604800}",
            "server": "cloudflare",
            "server-timing": "cfCacheStatus;desc=\"DYNAMIC\", cfL4;desc=\"?proto=TCP&rtt=21231&min_rtt=14258&rtt_var=14940&sent=7&recv=8&lost=0&retrans=0&sent_bytes=3903&recv_bytes=2091&delivery_rate=307195&cwnd=236&unsent_bytes=0&cid=e52ebc3ecd344e1c&ts=823&x=0\""
        },
        "requestHeaders": {
            "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
            "accept-encoding": "gzip, deflate, br, zstd",
            "accept-language": "en-US",
            "dnt": "1",
            "sec-fetch-dest": "document",
            "sec-fetch-mode": "navigate",
            "sec-fetch-site": "same-site",
            "sec-fetch-user": "?1",
            "te": "trailers",
            "upgrade-insecure-requests": "1",
            "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0"
        },
        "method": "GET",
        "type": "request"
    },
    "timeElapsed": 5493,
    "data": "success",
    "session": "ba4ff7a7-2422-41b9-99fa-dd11a5928ad4"
}
```
