---
title: "Request"
description: "직접 만든 HTTP 요청(메서드, 헤더, 본문)을 공개 사이트로 보내고, 사이트의 상태, 헤더, 본문을 받은 그대로 돌려받습니다."
---

> Every apinoa docs page as markdown: https://apinoa.com/llms.txt (all in one file: https://apinoa.com/llms-full.txt; this API family in one file: https://apinoa.com/docs/web/llms.txt)

```http
POST /v1/unlocker/request
```

파라미터는 JSON 본문(`Content-Type: application/json`)으로 보냅니다. `headers`는 헤더 이름과 값의 JSON 객체이고,
`body`는 문자열입니다. `x-api-key` 헤더는 apinoa 키이고, 본문 안의 `headers`가 사이트가 받는 헤더입니다.

## 요청

내 토큰으로 API를 호출하는 JSON `POST`:

```bash tab="cURL"
curl -X POST "https://gateway.apinoa.com/v1/unlocker/request" \
  -H "x-api-key: $APINOA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://httpbin.org/anything?q=shoes",
    "method": "POST",
    "headers": { "content-type": "application/json", "authorization": "Bearer YOUR_TOKEN" },
    "body": "{\"q\":\"shoes\"}"
  }'
```

```js tab="JavaScript"
const res = await fetch("https://gateway.apinoa.com/v1/unlocker/request", {
  method: "POST",
  headers: { "x-api-key": process.env.APINOA_API_KEY, "Content-Type": "application/json" },
  body: JSON.stringify({
    url: "https://httpbin.org/anything?q=shoes",
    method: "POST",
    headers: { "content-type": "application/json", authorization: "Bearer YOUR_TOKEN" },
    body: JSON.stringify({ q: "shoes" }),
  }),
});
const { success, data, error } = await res.json();
```

```python tab="Python"
import json
import os

import requests

res = requests.post(
    "https://gateway.apinoa.com/v1/unlocker/request",
    json={
        "url": "https://httpbin.org/anything?q=shoes",
        "method": "POST",
        "headers": {"content-type": "application/json", "authorization": "Bearer YOUR_TOKEN"},
        "body": json.dumps({"q": "shoes"}, separators=(",", ":")),
    },
    headers={"x-api-key": os.environ["APINOA_API_KEY"]},
)
body = res.json()
```

## 파라미터

| Parameter | Type | Required | Notes |
|---|---|---|---|
| `url` | string | yes | The address to request (http or https). |
| `body` | string |  |  |
| `bodyEncoding` | enum |  | `text` `base64` |
| `country` | enum |  | `US` |
| `followRedirects` | boolean |  |  |
| `headers` | object |  | Headers to send, as given. A real browser's own headers replace User-Agent, sec-ch-ua*, Accept-Encoding, Host, Connection and Content-Length. |
| `method` | enum |  | `GET` `POST` `PUT` `PATCH` `DELETE` `HEAD` |
| `profile` | enum |  | Which kind of browser to present: desktop or mobile. Absent: either. `desktop` `mobile` |

The same parameters, and every response type, are in the OpenAPI document: https://apinoa.com/openapi.json

- `body`는 최대 2 MiB이고, `GET`이나 `HEAD` 요청에는 본문이 없습니다. 바이너리 데이터는 base64로 바꿔
  `bodyEncoding: "base64"`와 함께 보내세요.
- `profile`은 요청을 어떤 종류의 브라우저로 보낼지 고릅니다: `desktop` 또는 `mobile`. 생략하면 알아서 고르고, 사이트가
  거부하면 바꿉니다.
- 헤더는 최대 50개입니다.

## 보내는 것

넘긴 헤더는 모두 보냅니다. 단, 브라우저의 신원을 이루는 헤더는 실제 브라우저의 값으로 바꿉니다. 요청의 나머지와 맞지
않는 값이 사이트가 요청을 거부하는 가장 흔한 이유이기 때문입니다.

| 헤더 | 처리 |
|---|---|
| `User-Agent`, `sec-ch-ua*` | 브라우저의 값으로 바꿉니다 |
| `Accept-Encoding` | 바꿉니다. 응답 본문은 압축을 풀어 돌려줍니다 |
| `Host`, `Content-Length` | `url`과 `body`에서 정합니다 |
| `Connection`, `Keep-Alive`, `Transfer-Encoding`, `TE`, `Upgrade`, `Proxy-Authorization`, `Proxy-Connection` | 보내지 않습니다 |
| 그 밖의 모든 헤더(`Authorization`, `Cookie`, `Content-Type`, `Accept`, 직접 정한 `X-*`) | 쓴 그대로 보냅니다 |

리디렉션은 따라갑니다. `followRedirects`가 `false`이면 `3xx` 응답 자체를 돌려줍니다. 다른 오리진(스킴, 호스트, 포트
중 하나라도 다른 곳)으로 가는 리디렉션에는 `Authorization`과 `Cookie` 헤더를 넘기지 않습니다. `303`, 그리고 `POST`,
`PUT`, `PATCH`, `DELETE`에 대한 `301`·`302`는 브라우저처럼 본문 없이 `GET`으로 따라갑니다.

## 응답

`data`에 [`UnlockResult`](/docs/api-reference/web-data/response-schema#unlockresult)를 돌려줍니다. 실제 응답 전체입니다.
httpbin은 받은 요청을 그대로 되돌려 주므로, `body`에서 사이트가 받은 요청을 볼 수 있습니다(`origin`의 주소는 문서용
주소로 바꿨습니다).

```json
{
  "success": true,
  "data": {
    "status": 200,
    "url": "https://httpbin.org/anything?q=shoes",
    "headers": {
      "Access-Control-Allow-Credentials": "true",
      "Access-Control-Allow-Origin": "*",
      "Access-Control-Expose-Headers": "Retry-After, RateLimit, RateLimit-Policy, WWW-Authenticate",
      "Content-Type": "application/json",
      "Date": "Fri, 20 Nov 2026 09:42:23 GMT",
      "X-Content-Type-Options": "nosniff"
    },
    "body": "{\n  \"args\": {\n    \"q\": \"shoes\"\n  },\n  \"headers\": {\n    \"Accept\": \"application/json\",\n    \"Accept-Encoding\": \"gzip, deflate, br, zstd\",\n    \"Accept-Language\": \"en-US,en;q=0.9\",\n    \"Authorization\": \"Bearer YOUR_TOKEN\",\n    \"Cache-Control\": \"no-cache\",\n    \"Content-Length\": \"13\",\n    \"Content-Type\": \"application/json\",\n    \"Host\": \"httpbin.org\",\n    \"Pragma\": \"no-cache\",\n    \"Priority\": \"u=1, i\",\n    \"Sec-Ch-Ua\": \"\\\"Not;A=Brand\\\";v=\\\"8\\\", \\\"Chromium\\\";v=\\\"150\\\", \\\"Google Chrome\\\";v=\\\"150\\\"\",\n    \"Sec-Ch-Ua-Mobile\": \"?0\",\n    \"Sec-Ch-Ua-Platform\": \"\\\"Windows\\\"\",\n    \"Sec-Fetch-Dest\": \"empty\",\n    \"Sec-Fetch-Mode\": \"cors\",\n    \"Sec-Fetch-Site\": \"same-origin\",\n    \"User-Agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36\"\n  },\n  \"method\": \"POST\",\n  \"origin\": \"203.0.113.7\",\n  \"url\": \"https://httpbin.org/anything?q=shoes\",\n  \"data\": \"{\\\"q\\\":\\\"shoes\\\"}\",\n  \"files\": {},\n  \"form\": {},\n  \"json\": {\n    \"q\": \"shoes\"\n  }\n}\n",
    "bodyEncoding": "text"
  }
}
```

## 에러

| 상태 | 코드 | 의미 |
|---|---|---|
| 400 | `INVALID_PARAMS` | 파라미터가 없거나, 알 수 없거나, 범위를 벗어났습니다: `url`이 http·https 주소가 아님, `GET`·`HEAD`에 `body`가 있음, `base64` 본문이 base64가 아님, 본문이 2 MiB 초과, 헤더가 50개 초과. 또는 호스트가 거부되었습니다(아래 참고). 메시지에 이유가 나옵니다. |
| 400 | `UPSTREAM_TOO_LARGE` | 사이트의 응답이 10 MiB보다 큽니다. |
| 400 | `INVALID_PARAMS` | 사이트의 TLS 인증서를 검증할 수 없습니다(모든 요청에서 확인합니다). 메시지에 호스트가 나옵니다. |
| 401 | `UNAUTHORIZED` | `x-api-key` 헤더가 없거나, 폐기되었거나 알 수 없는 키입니다. |
| 402 | `INSUFFICIENT_CREDITS` | 크레딧이 이 호출 비용에 모자랍니다. 대시보드에서 플랜을 고르거나 충전하세요. |
| 404 | `NOT_FOUND` | 사이트가 없거나 연결을 거부합니다: 이름이 조회되지 않거나, 연결을 받는 곳이 없습니다. 메시지에 호스트가 나옵니다. |
| 429 | `MARKETPLACE_SATURATED` | 동시 호출이 너무 많습니다. `Retry-After` 초만큼 기다린 뒤 다시 시도하세요. |
| 503 | `UPSTREAM_UNAVAILABLE` | 모든 시도에서 사이트가 봇 확인에 막혀 있었습니다. 나중에 다시 시도하세요. |

모든 코드는 [Errors](/docs/errors)에 있습니다. 실패한 호출은 과금되지 않습니다.

### 거부되는 호스트

다음은 첫 요청에서도, 리디렉션마다에서도 `INVALID_PARAMS`로 거부됩니다.

- **apinoa API가 다루는 사이트.** Amazon, Walmart, TikTok Shop, AliExpress, Reddit, LinkedIn, TikTok, YouTube, Threads,
  X, Instagram, Facebook, Google(검색, Shopping, Play, Trends, Gemini), Bing, Copilot, Naver, Daum, Yahoo 검색,
  Yahoo! JAPAN, Yandex, Baidu, Sogou, Seznam, DuckDuckGo, Tripadvisor, App Store, ChatGPT, Doubao, Qwen과 그 이미지·동영상
  호스트. 메시지에 대신 호출할 API가 나옵니다. 예:
  `www.amazon.com is served by the amazon API — call /amazon/… instead of the unlocker`.
- **정부·군 사이트**(`.gov`, `.mil`, `gov.uk`, `go.kr`, `europa.eu`와 여러 나라의 정부 도메인).
- **사설·내부 주소**(`localhost`, `10.0.0.0/8`, `192.168.0.0/16`, 내부 이름).

## 가격

**가격** 응답 본문이 시작된 MiB마다 1 credit. 1 MiB까지의 응답은 1 credit, 1.2 MiB는 2 credits, 가장 큰 10 MiB는 10 credits입니다.

## 참고

- **사이트의 응답을 그대로 돌려줍니다.** 사이트가 보낸 `404`, `500`, 단순한 `403`·`429`·`503`은 사이트의 응답이므로
  `status`와 함께 돌려주고 과금됩니다. 봇 확인 페이지는 다릅니다. 사이트가 막은 요청은 자동으로 다시 시도하며, 그래도
  막히면 `UPSTREAM_UNAVAILABLE`이고 과금되지 않습니다.
- **텍스트 또는 base64.** 올바른 UTF-8인 텍스트 응답은 `body`에 텍스트로, 그 밖의 것(이미지, PDF, zip)은 base64로
  `bodyEncoding: "base64"`와 함께 옵니다. 디코딩하면 사이트가 보낸 바이트와 정확히 같습니다.
- **JavaScript는 실행하지 않습니다.** 응답은 사이트 서버가 보낸 그대로입니다.
- TLS 인증서는 항상 확인합니다. `country`는 유일한 값인 `US`입니다.
- 모든 타입의 필드는 [Response Schema](/docs/api-reference/web-data/response-schema)에 있습니다.
