# FlashData YouTube Suggestions API

YouTube 자동 완성 된 제안을 키워드 또는 구문, 언어 및 지역 제어와 검색하십시오.

Canonical 참고: https://flashdata.dev/ko/docs/sources/youtube_suggestions
평가: 2026-10-23

끝점: POST https://data.flashdata.dev/v1/queries/realtime
인증: X-API-Key: YOUR_API_KEY
모드: [Realtime](https://flashdata.dev/ko/docs/reference/realtime-and-async/reference.md#realtime) · [Async](https://flashdata.dev/ko/docs/reference/realtime-and-async/reference.md#async) · [Batch](https://flashdata.dev/ko/docs/reference/batch-and-bulk/reference.md#batch)

필수 소스 권한: youtube_suggestions

YOUR_API_KEY를 API 키로 교체하여 소스 권한 및 사용 가능한 크레딧을 제공합니다. 서버 또는 에이전트 호스트에 대한 요청을 실행합니다.

[인증 설정](https://flashdata.dev/ko/docs/guides/headers-and-authentication/reference.md)

[검색에 제안을 턴](https://flashdata.dev/ko/docs/guides/youtube-data-guide/reference.md#suggestions)

<a id="quickstart"></a>

## 자주 묻는 질문

### Python

```bash
python3 -m pip install requests
```

```python
import json

import requests

api_key = "YOUR_API_KEY"
payload = {
    "source": "youtube_suggestions",
    "query": "python",
    "params": {
        "language": "en",
        "region": "us",
    },
}

response = requests.post(
    "https://data.flashdata.dev/v1/queries/realtime",
    headers={"X-API-Key": api_key},
    json=payload,
    timeout=120,
)
response.raise_for_status()
print(json.dumps(response.json(), ensure_ascii=False, indent=2))
```

### Bash / cURL

```bash
api_key="YOUR_API_KEY"
curl --fail-with-body --max-time 120 --request POST "https://data.flashdata.dev/v1/queries/realtime" \
  --header "Content-Type: application/json" \
  --header "X-API-Key: $api_key" \
  --data-binary @- <<'FLASHDATA_JSON'
{
  "source": "youtube_suggestions",
  "query": "python",
  "params": {
    "language": "en",
    "region": "us"
  }
}
FLASHDATA_JSON
```

<a id="parameters"></a>

## 제품 설명

<a id="parameters-group-0"></a>

### 요청 본문

| 제품 설명 | 유형 | 필수 | 기본값 | 의 특징 |
| --- | --- | --- | --- | --- |
| <a id="parameter-source"></a> source | string | 이름 * | — | youtube_suggestions로 설정.  |
| <a id="parameter-query"></a> query | string | 이름 * | 설정하기 | 연락처 최소한도 길이: 1. 최대 길이: 2000. |
| <a id="parameter-params"></a> params | object | 의 아니 | {} | 이 요구를 위한 Settings.  |
| <a id="parameter-callback_url"></a> callback_url | string · nullable | 의 아니 | 설정하기 | Async 및 배치만. 공공 HTTPS 완료 URL 포트에 443, 최대 2,048 문자. 사용자 자격 또는 URL 파편이 없습니다. Omit, null 또는 알림이 없는 빈 문자열을 사용하십시오. 일괄 처리에서, 각 쿼리에 설정, 외부 params.  |

<a id="parameters-group-1"></a>

### 언어 및 지역

| 제품 설명 | 유형 | 필수 | 기본값 | 의 특징 |
| --- | --- | --- | --- | --- |
| <a id="parameter-params-language"></a> params.language | string | 의 아니 | "en" | 언어 코드. 최소한도 길이: 1. 최대 길이: 35. 본: ^[A-Za-z0-9-]+$ |
| <a id="parameter-params-region"></a> params.region | string | 의 아니 | "US" | 미국, GB 또는 DE와 같은 2 letter 국가 코드. 최소한도 길이: 2. 최대 길이: 2. 본: ^[A-Za-z]{2}$ |

<a id="response"></a>

## 결과보기

response.json로 성공적인 JSON 응답을 저장하십시오. read-response.py로 저장하고 python read-response.py를 실행하십시오. Python의 표준 라이브러리를 사용하고 새로운 요청을 만들 수 있습니다.

### read-response.py

```python
import json
from pathlib import Path

response = json.loads(Path("response.json").read_text(encoding="utf-8-sig"))
if response.get("status") not in ("done", "completed") or not isinstance(response.get("results"), list):
    raise SystemExit("Expected completed result JSON; inspect the response or job status.")
if not response["results"]:
    print("[]")
    raise SystemExit(0)
result = response["results"][0]

output = result  # An array of phrases, including an empty array.
print(json.dumps(output, ensure_ascii=False, indent=2))
```

## 응답 예제

기록된 예; 분야 및 조사는 근원에 달려 있고 요구한 입력.
```json
{
  "source": "youtube_suggestions",
  "status": "done",
  "results": [
    [
      "python for beginners",
      "python hunting everglades",
      "python",
      "python full course",
      "python funk",
      "python got7",
      "python commands",
      "python cowboy",
      "python tutorial",
      "python projects",
      "python coding",
      "python course",
      "python snake",
      "python basics"
    ]
  ],
  "usage": {
    "credits": 0.01
  },
  "created_at": "2026-09-16T07:41:47.147Z"
}
```

## 응답 분야

| - 연혁 | 유형 | 의 특징 |
| --- | --- | --- |
| source | string | 요청된 API 소스. |
| status | string | 실시간 요청이 성공할 때 완료됩니다. |
| created_at | string | ISO 8601 형식의 응답 생성 시간. |
| usage.credits | number | 요청시 크레딧이 청구되며, 플랜을 기준으로 합니다. |
| results[0] | array<string> | Autocomplete 제안. 각 배열 항목은 제안 된 검색 문구입니다. |

- 빈 배열은 제안이 공급된 접두사에 대해 반환되지 않습니다.

## 응답 형식

응답은 기본적으로 JSON를 사용합니다. 이 선택적인 우두머리를 가진 다른 체재를 선택하십시오.

- Accept: application/json (기본 정보) 또는 text/plain. 일반 텍스트는 읽기 가능한 동일한 필드를 제공하며 들여쓰는 레이아웃을 나타냅니다.
- X-Respond-With: markdown. 원래 필드에 대 한 unset를 남겨 주세요. Markdown는 응답 체재로 작동합니다.

Markdown는 실시간 쿼리 및 완료 결과를 위해 사용할 수 있습니다.

아래 필드는 기본 JSON 응답을 설명합니다.

[요청 및 응답 형식 예](https://flashdata.dev/ko/docs/guides/response-formats/reference.md#headers)

<a id="job-lifecycle"></a>

<a id="async-batch"></a>

## API 기초

이 소스의 매개 변수를 사용 위의 요청 빌더와 예제. Python 및 cURL 예제를 공유 제출, 상태 및 결과 단계에 사용됩니다. Batch 바디는 쿼리를 포함하는 JSON 객체입니다. 각 항목은 자신의 직업 ID를 반환합니다.

- [Async 요청 및 영수증](https://flashdata.dev/ko/docs/reference/realtime-and-async/reference.md#async)

<a id="job-status"></a>

- [작업 상태 확인](https://flashdata.dev/ko/docs/reference/realtime-and-async/reference.md#status)

<a id="job-results"></a>

- [완료된 결과를 읽으십시오](https://flashdata.dev/ko/docs/reference/realtime-and-async/reference.md#results)
- [Batch JSON 요청](https://flashdata.dev/ko/docs/reference/batch-and-bulk/reference.md#batch)
- [고객 OpenAPI](https://flashdata.dev/docs/openapi.json)

<a id="webhooks"></a>

<a id="callbacks"></a>

## 보상 알림

- [완료 webhooks를 수신하고 확인](https://flashdata.dev/ko/docs/guides/async-batch/reference.md#webhooks)

<a id="troubleshooting"></a>

## 관련 상품

- [오류와 상태 코드](https://flashdata.dev/ko/docs/errors/reference.md#status-codes)
- [재발행](https://flashdata.dev/ko/docs/errors/reference.md#retries)

## 관련 API

- [YouTube Search API](https://flashdata.dev/ko/docs/sources/youtube_search/reference.md)
- [YouTube 확장 검색 API](https://flashdata.dev/ko/docs/sources/youtube_search_extended/reference.md)
