querystring필수
Search keyword, the search text being typed
https://api.sandbase.ai/v1/api/reddit/app/search-typeaheadReturns autocomplete suggestions for the Reddit search box based on typed input. Includes options to toggle adult content, apply safe search settings, and format response data.
[
{
"data": {
"search": {
"dynamic": {
"components": {
"__typename": "TypeaheadLayout",
"main": [
{
"__typename": "SearchTypeaheadList",
"behaviors": {
"collapse": null,
"expand": null,
"expandCta": null
},
"children": [
{
"__typename": "QueryAutocomplete",
"behaviors": {
"default": {
"__typename": "SearchQueryReformulationBehavior",
"query": "openai",
"telemetry": {
"__typename": "SearchElementTelemetry",
"events": "… 1 items in the full response",
"trackingContext": "…"
}
}
},
"presentation": {
"__typename": "QueryAutocompleteDefaultPresentation",
"query": "openai",
"suggestion": "%query%"
},
"telemetry": {
"__typename": "SearchElementTelemetry",
"events": [
{
"action": "view",
"noun": "typeahead",
"source": "search",
"trigger": "VIEW",
"triggerConfiguration": null
}
],
"trackingContext": {
"__typename": "SearchTelemetryTrackingContext",
"actionInfo": {
"paneName": null,
"position": 0,
"reason": null,
"relativePosition": 0,
"type": "query_suggestion"
},
"answers": null,
"metaSearch": {
"displayQuery": "openai",
"rawQuery": "openai"
},
"post": null,
"profile": null,
"search": {
"isNsfw": false,
"query": "OpenAI",
"queryID": "9ce648d0-8c03-4308-9c9f-e5ee884d8532",
"range": null,
"safeSearch": "UNAVAILABLE",
"scope": "…",
"snippet": null,
"snippetId": null,
"sort": null
},
"subreddit": null
}
}
},
{
"__typename": "QueryAutocomplete",
"behaviors": {
"default": {
"__typename": "SearchQueryReformulationBehavior",
"query": "openai australia",
"telemetry": {
"__typename": "SearchElementTelemetry",
"events": "… 1 items in the full response",
"trackingContext": "…"
}
}
},
"presentation": {
"__typename": "QueryAutocompleteDefaultPresentation",
"query": "openai",
"suggestion": "%query% australia"
},
"telemetry": {
"__typename": "SearchElementTelemetry",
"events": [
{
"action": "view",
"noun": "typeahead",
"source": "search",
"trigger": "VIEW",
"triggerConfiguration": null
}
],
"trackingContext": {
"__typename": "SearchTelemetryTrackingContext",
"actionInfo": {
"paneName": null,
"position": 1,
"reason": null,
"relativePosition": 1,
"type": "query_suggestion"
},
"answers": null,
"metaSearch": {
"displayQuery": "openai australia",
"rawQuery": "openai australia"
},
"post": null,
"profile": null,
"search": {
"isNsfw": false,
"query": "OpenAI",
"queryID": "9ce648d0-8c03-4308-9c9f-e5ee884d8532",
"range": null,
"safeSearch": "UNAVAILABLE",
"scope": "…",
"snippet": null,
"snippetId": null,
"sort": null
},
"subreddit": null
}
}
},
{
"__typename": "QueryAutocomplete",
"behaviors": {
"default": {
"__typename": "SearchQueryReformulationBehavior",
"query": "openai math",
"telemetry": {
"__typename": "SearchElementTelemetry",
"events": "… 1 items in the full response",
"trackingContext": "…"
}
}
},
"presentation": {
"__typename": "QueryAutocompleteDefaultPresentation",
"query": "openai",
"suggestion": "%query% math"
},
"telemetry": {
"__typename": "SearchElementTelemetry",
"events": [
{
"action": "view",
"noun": "typeahead",
"source": "search",
"trigger": "VIEW",
"triggerConfiguration": null
}
],
"trackingContext": {
"__typename": "SearchTelemetryTrackingContext",
"actionInfo": {
"paneName": null,
"position": 2,
"reason": null,
"relativePosition": 2,
"type": "query_suggestion"
},
"answers": null,
"metaSearch": {
"displayQuery": "openai math",
"rawQuery": "openai math"
},
"post": null,
"profile": null,
"search": {
"isNsfw": false,
"query": "OpenAI",
"queryID": "9ce648d0-8c03-4308-9c9f-e5ee884d8532",
"range": null,
"safeSearch": "UNAVAILABLE",
"scope": "…",
"snippet": null,
"snippetId": null,
"sort": null
},
"subreddit": null
}
}
},
"… 1 more items in the full response"
],
"id": "section_0_pipeline_1_query_autocomplete",
"presentation": {
"__typename": "SearchTypeaheadListDefaultPresentation",
"title": ""
}
},
{
"__typename": "SearchTypeaheadList",
"behaviors": {
"collapse": null,
"expand": null,
"expandCta": null
},
"children": [
{
"__typename": "TypeaheadSuggestion",
"behaviors": {
"default": {
"__typename": "SearchCommunityNavigationBehavior",
"id": "t5_3b9u5",
"name": "OpenAI",
"telemetry": {
"__typename": "SearchElementTelemetry",
"events": "… 1 items in the full response",
"trackingContext": "…"
},
"url": "/r/OpenAI/"
}
},
"presentation": {
"__typename": "TypeaheadSuggestionDefaultPresentation",
"description": "890K weekly visitors",
"displayTags": [],
"icon": "https://styles.redditmedia.com/t5_3b9u5/styles/communityIcon_sls3rtre3qxg1.png",
"name": "r/OpenAI"
},
"telemetry": {
"__typename": "SearchElementTelemetry",
"events": [
{
"action": "view",
"noun": "typeahead",
"source": "search",
"trigger": "VIEW",
"triggerConfiguration": null
}
],
"trackingContext": {
"__typename": "SearchTelemetryTrackingContext",
"actionInfo": {
"paneName": null,
"position": 0,
"reason": null,
"relativePosition": 4,
"type": "subreddit"
},
"answers": null,
"metaSearch": null,
"post": null,
"profile": null,
"search": {
"isNsfw": false,
"query": "OpenAI",
"queryID": "9ce648d0-8c03-4308-9c9f-e5ee884d8532",
"range": null,
"safeSearch": "UNAVAILABLE",
"scope": "…",
"snippet": null,
"snippetId": null,
"sort": null
},
"subreddit": {
"id": "t5_3b9u5",
"isNsfw": false,
"isQuarantined": false,
"name": "OpenAI"
}
}
}
},
{
"__typename": "TypeaheadSuggestion",
"behaviors": {
"default": {
"__typename": "SearchCommunityNavigationBehavior",
"id": "t5_3ufsix",
"name": "OpenSourceAI",
"telemetry": {
"__typename": "SearchElementTelemetry",
"events": "… 1 items in the full response",
"trackingContext": "…"
},
"url": "/r/OpenSourceAI/"
}
},
"presentation": {
"__typename": "TypeaheadSuggestionDefaultPresentation",
"description": "8.8K weekly visitors",
"displayTags": [],
"icon": "https://styles.redditmedia.com/t5_3ufsix/styles/communityIcon_9k59886hou5c1.png",
"name": "r/OpenSourceAI"
},예시를 선택하면 입력값과 결과가 플레이그라운드에 로드됩니다.
Returns Reddit search box autocomplete suggestions for a typed text. It needs one input, query, and returns suggested search phrases plus matching subreddits.
OpenAI.curl -X POST "https://api.sandbase.ai/v1/api/reddit/app/search-typeahead" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "OpenAI"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Search keyword, the search text being typed |
allow_nsfw | string | No | Whether to allow NSFW (adult) content display, "0" means disallow, "1" means allow |
need_format | boolean | No | Whether to clean and format the data |
safe_search | string | No | Safe search setting, options are "unset" or "strict" |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"search": {
"dynamic": {
"components": {
"__typename": "TypeaheadLayout",
"main": [
{
"__typename": "SearchTypeaheadList",
"behaviors": {
"collapse": null,
"expand": null,
"expandCta": null
},
"children": [
{
"__typename": "QueryAutocomplete",
"behaviors": {
"default": {
"__typename": "SearchQueryReformulationBehavior",
"query": "openai",
"telemetry": {
"__typename": "SearchElementTelemetry",
"events": [
{
"action": "click",
"noun": "typeahead",
"source": "search",
"trigger": "CLICK",
"triggerConfiguration": null
}
],
"trackingContext": {
"__typename": "SearchTelemetryTrackingContext",
"actionInfo": {
"paneName": null,
"position": 0,
"reason": null,
"relativePosition": 0,
"type": "query_suggestion"
},
"answers": null,
"metaSearch": {
"displayQuery": "openai",
"rawQuery": "openai"
},
"post": null,
"profile": null,
"search": {
"isNsfw": false,
"query": "OpenAI",
"queryID": "f2458504-7cda-400f-abc7-324fd62e4f9f",
"range": null,
"safeSearch": "UNAVAILABLE",
"scope": {
"id": null,
"name": null,
"path": "/",
"type": "GLOBAL"
},
"snippet": null,
"snippetId": null
},
"subreddit": null
}
}
}
},
"presentation": {
"__typename": "QueryAutocompleteDefaultPresentation",
"query": "openai",
"suggestion": "%query%"
},
"telemetry": {
"__typename": "SearchElementTelemetry",
"events": [
{
"action": "view",
"noun": "typeahead",
"source": "search",
"trigger": "VIEW",
"triggerConfiguration": null
}
],
"trackingContext": {
"__typename": "SearchTelemetryTrackingContext",
"actionInfo": {
"paneName": null,
"position": 0,
"reason": null,
"relativePosition": 0,
"type": "query_suggestion"
},
"answers": null,
"metaSearch": {
"displayQuery": "openai",
"rawQuery": "openai"
},
"post": null,
"profile": null,
"search": {
"isNsfw": false,
"query": "OpenAI",
"queryID": "f2458504-7cda-400f-abc7-324fd62e4f9f",
"range": null,
"safeSearch": "UNAVAILABLE",
"scope": {
"id": null,
"name": null,
"path": "/",
"type": "GLOBAL"
},
"snippet": null,
"snippetId": null
},
"subreddit": null
}
}
}
],
"id": "section_0_pipeline_1_query_autocomplete",
"presentation": {
"__typename": "SearchTypeaheadListDefaultPresentation",
"title": ""
}
}
]
}
}
}
}
| Field | Meaning |
|---|---|
search.dynamic.components.main[] | Sections of the typeahead list. One section holds query suggestions (QueryAutocomplete) and another holds subreddit suggestions (TypeaheadSuggestion). |
search.dynamic.components.main[].children[].__typename | Type of each suggestion. QueryAutocomplete is a search phrase and TypeaheadSuggestion is a community result. |
search.dynamic.components.main[].children[].behaviors.default.query | The full search phrase to run if the user picks this suggestion. Present on query suggestions. |
search.dynamic.components.main[].children[].presentation.suggestion | Display template for a query suggestion. The %query% token stands for the typed text. |
search.dynamic.components.main[].children[].behaviors.default.id / search.dynamic.components.main[].children[].behaviors.default.name | ID and name of the suggested subreddit, for example t5_7hqomg and ChatGPT. |
search.dynamic.components.main[].children[].behaviors.default.url | Relative path of the suggested subreddit, for example /r/ChatGPT/. |
search.dynamic.components.main[].children[].presentation.name | Display name of the suggested subreddit, for example r/ChatGPT. |
search.dynamic.components.main[].children[].presentation.description / search.dynamic.components.main[].children[].presentation.icon | Short description text and icon image URL for a subreddit suggestion. |
search.dynamic.components.main[].children[].telemetry.trackingContext.actionInfo.position | Zero-based position of the suggestion in its list. type in the same object shows the kind, such as query_suggestion or subreddit. |
search.dynamic.components.main[].children[].telemetry.trackingContext.search.queryID | UUID that identifies this typeahead request. All suggestions in one response share it. |
query. The search query is echoed back inside the tracking context.allow_nsfw takes "0" or "1", and safe_search takes "unset" or "strict".t5_ prefix. Use them with Reddit App Subreddit Info or Reddit Community Highlights.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
빌드를 시작하세요
통합 인증 및 사용량 추적이 있는 플랫폼 API 엔드포인트입니다.
curl -X POST "https://api.sandbase.ai/v1/api/reddit/app/search-typeahead" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "OpenAI",
"allow_nsfw": "0",
"need_format": false,
"safe_search": "unset"
}'서버 환경에 SandBase API 키를 설정하세요. 요청에는 Bearer 인증이 사용됩니다.
export SANDBASE_API_KEY="YOUR_API_KEY"키는 서버에 보관하세요. 브라우저 코드에 노출하지 마세요.
querystring필수Search keyword, the search text being typed
allow_nsfwstringWhether to allow NSFW (adult) content display, "0" means disallow, "1" means allow
기본값: "0"
need_formatbooleanWhether to clean and format the data
기본값: false
safe_searchstringSafe search setting, options are "unset" or "strict"
기본값: "unset"
이 API의 저장된 예시 응답입니다. 확인할 때 라이브 요청은 실행되지 않습니다.
[
{
"data": {
"search": {
"dynamic": {
"components": {
"__typename": "TypeaheadLayout",
"main": [
{
"__typename": "SearchTypeaheadList",
"behaviors": {
"collapse": null,
"expand": null,
"expandCta": null
},
"children": [
{
"__typename": "QueryAutocomplete",
"behaviors": {
"default": {
"__typename": "SearchQueryReformulationBehavior",
"query": "openai",
"telemetry": {
"__typename": "SearchElementTelemetry",
"events": "… 1 items in the full response",
"trackingContext": "…"
}
}
},
"presentation": {
"__typename": "QueryAutocompleteDefaultPresentation",
"query": "openai",
"suggestion": "%query%"
},
"telemetry": {
"__typename": "SearchElementTelemetry",
"events": [
{
"action": "view",
"noun": "typeahead",
"source": "search",
"trigger": "VIEW",
"triggerConfiguration": null
}
],
"trackingContext": {
"__typename": "SearchTelemetryTrackingContext",
"actionInfo": {
"paneName": null,
"position": 0,
"reason": null,
"relativePosition": 0,
"type": "query_suggestion"
},
"answers": null,
"metaSearch": {
"displayQuery": "openai",
"rawQuery": "openai"
},
"post": null,
"profile": null,
"search": {
"isNsfw": false,
"query": "OpenAI",
"queryID": "9ce648d0-8c03-4308-9c9f-e5ee884d8532",
"range": null,
"safeSearch": "UNAVAILABLE",
"scope": "…",
"snippet": null,
"snippetId": null,
"sort": null
},
"subreddit": null
}
}
},
{
"__typename": "QueryAutocomplete",
"behaviors": {
"default": {
"__typename": "SearchQueryReformulationBehavior",
"query": "openai australia",
"telemetry": {
"__typename": "SearchElementTelemetry",
"events": "… 1 items in the full response",
"trackingContext": "…"
}
}
},
"presentation": {
"__typename": "QueryAutocompleteDefaultPresentation",
"query": "openai",
"suggestion": "%query% australia"
},
"telemetry": {
"__typename": "SearchElementTelemetry",
"events": [
{
"action": "view",
"noun": "typeahead",
"source": "search",
"trigger": "VIEW",
"triggerConfiguration": null
}
],
"trackingContext": {
"__typename": "SearchTelemetryTrackingContext",
"actionInfo": {
"paneName": null,
"position": 1,
"reason": null,
"relativePosition": 1,
"type": "query_suggestion"
},
"answers": null,
"metaSearch": {
"displayQuery": "openai australia",
"rawQuery": "openai australia"
},
"post": null,
"profile": null,
"search": {
"isNsfw": false,
"query": "OpenAI",
"queryID": "9ce648d0-8c03-4308-9c9f-e5ee884d8532",
"range": null,
"safeSearch": "UNAVAILABLE",
"scope": "…",
"snippet": null,
"snippetId": null,
"sort": null
},
"subreddit": null
}
}
},
{
"__typename": "QueryAutocomplete",
"behaviors": {
"default": {
"__typename": "SearchQueryReformulationBehavior",
"query": "openai math",
"telemetry": {
"__typename": "SearchElementTelemetry",
"events": "… 1 items in the full response",
"trackingContext": "…"
}
}
},
"presentation": {
"__typename": "QueryAutocompleteDefaultPresentation",
"query": "openai",
"suggestion": "%query% math"
},
"telemetry": {
"__typename": "SearchElementTelemetry",
"events": [
{
"action": "view",
"noun": "typeahead",
"source": "search",
"trigger": "VIEW",
"triggerConfiguration": null
}
],
"trackingContext": {
"__typename": "SearchTelemetryTrackingContext",
"actionInfo": {
"paneName": null,
"position": 2,
"reason": null,
"relativePosition": 2,
"type": "query_suggestion"
},
"answers": null,
"metaSearch": {
"displayQuery": "openai math",
"rawQuery": "openai math"
},
"post": null,
"profile": null,
"search": {
"isNsfw": false,
"query": "OpenAI",
"queryID": "9ce648d0-8c03-4308-9c9f-e5ee884d8532",
"range": null,
"safeSearch": "UNAVAILABLE",
"scope": "…",
"snippet": null,
"snippetId": null,
"sort": null
},
"subreddit": null
}
}
},
"… 1 more items in the full response"
],
"id": "section_0_pipeline_1_query_autocomplete",
"presentation": {
"__typename": "SearchTypeaheadListDefaultPresentation",
"title": ""
}
},
{
"__typename": "SearchTypeaheadList",
"behaviors": {
"collapse": null,
"expand": null,
"expandCta": null
},
"children": [
{
"__typename": "TypeaheadSuggestion",
"behaviors": {
"default": {
"__typename": "SearchCommunityNavigationBehavior",
"id": "t5_3b9u5",
"name": "OpenAI",
"telemetry": {
"__typename": "SearchElementTelemetry",
"events": "… 1 items in the full response",
"trackingContext": "…"
},
"url": "/r/OpenAI/"
}
},
"presentation": {
"__typename": "TypeaheadSuggestionDefaultPresentation",
"description": "890K weekly visitors",
"displayTags": [],
"icon": "https://styles.redditmedia.com/t5_3b9u5/styles/communityIcon_sls3rtre3qxg1.png",
"name": "r/OpenAI"
},
"telemetry": {
"__typename": "SearchElementTelemetry",
"events": [
{
"action": "view",
"noun": "typeahead",
"source": "search",
"trigger": "VIEW",
"triggerConfiguration": null
}
],
"trackingContext": {
"__typename": "SearchTelemetryTrackingContext",
"actionInfo": {
"paneName": null,
"position": 0,
"reason": null,
"relativePosition": 4,
"type": "subreddit"
},
"answers": null,
"metaSearch": null,
"post": null,
"profile": null,
"search": {
"isNsfw": false,
"query": "OpenAI",
"queryID": "9ce648d0-8c03-4308-9c9f-e5ee884d8532",
"range": null,
"safeSearch": "UNAVAILABLE",
"scope": "…",
"snippet": null,
"snippetId": null,
"sort": null
},
"subreddit": {
"id": "t5_3b9u5",
"isNsfw": false,
"isQuarantined": false,
"name": "OpenAI"
}
}
}
},
{
"__typename": "TypeaheadSuggestion",
"behaviors": {
"default": {
"__typename": "SearchCommunityNavigationBehavior",
"id": "t5_3ufsix",
"name": "OpenSourceAI",
"telemetry": {
"__typename": "SearchElementTelemetry",
"events": "… 1 items in the full response",
"trackingContext": "…"
},
"url": "/r/OpenSourceAI/"
}
},
"presentation": {
"__typename": "TypeaheadSuggestionDefaultPresentation",
"description": "8.8K weekly visitors",
"displayTags": [],
"icon": "https://styles.redditmedia.com/t5_3ufsix/styles/communityIcon_9k59886hou5c1.png",
"name": "r/OpenSourceAI"
},
"telemetry": {
"__typename": "SearchElementTelemetry",
"events": [
{
"action": "view",
"noun": "typeahead",
"source": "search",
"trigger": "VIEW",
"triggerConfiguration": null
}
],
"trackingContext": {
"__typename": "SearchTelemetryTrackingContext",
"actionInfo": {
"paneName": null,
"position": 1,
"reason": null,
"relativePosition": 5,
"type": "subreddit"
},
"answers": null,
"metaSearch": null,
"post": null,
"profile": null,
"search": {
"isNsfw": false,
"query": "OpenAI",
"queryID": "9ce648d0-8c03-4308-9c9f-e5ee884d8532",
"range": null,
"safeSearch": "UNAVAILABLE",
"scope": "…",
"snippet": null,
"snippetId": null,
"sort": null
},
"subreddit": {
"id": "t5_3ufsix",
"isNsfw": false,
"isQuarantined": false,
"name": "OpenSourceAI"
}
}
}
},
{
"__typename": "TypeaheadSuggestion",
"behaviors": {
"default": {
"__typename": "SearchCommunityNavigationBehavior",
"id": "t5_80hi9u",
"name": "aipromptprogramming",
"telemetry": {
"__typename": "SearchElementTelemetry",
"events": "… 1 items in the full response",
"trackingContext": "…"
},
"url": "/r/aipromptprogramming/"
}
},
"presentation": {
"__typename": "TypeaheadSuggestionDefaultPresentation",
"description": "40K weekly visitors",
"displayTags": [],
"icon": "https://styles.redditmedia.com/t5_80hi9u/styles/communityIcon_qb2lce1qjjhh1.png",
"name": "r/aipromptprogramming"
},
"telemetry": {
"__typename": "SearchElementTelemetry",
"events": [
{
"action": "view",
"noun": "typeahead",
"source": "search",
"trigger": "VIEW",
"triggerConfiguration": null
}
],
"trackingContext": {
"__typename": "SearchTelemetryTrackingContext",
"actionInfo": {
"paneName": null,
"position": 2,
"reason": null,
"relativePosition": 6,
"type": "subreddit"
},
"answers": null,
"metaSearch": null,
"post": null,
"profile": null,
"search": {
"isNsfw": false,
"query": "OpenAI",
"queryID": "9ce648d0-8c03-4308-9c9f-e5ee884d8532",
"range": null,
"safeSearch": "UNAVAILABLE",
"scope": "…",
"snippet": null,
"snippetId": null,
"sort": null
},
"subreddit": {
"id": "t5_80hi9u",
"isNsfw": false,
"isQuarantined": false,
"name": "aipromptprogramming"
}
}
}
},
"… 2 more items in the full response"
],
"id": "subreddit_typeahead_section",
"presentation": {
"__typename": "SearchTypeaheadListDefaultPresentation",
"title": "Communities"
}
}
]
}
}
}
}
}
]더 살펴보기
| API | 가격 | 응답 |
|---|---|---|
Reddit | $0.001 / 호출 | JSON |
Reddit | $0.001 / 호출 | JSON |
Reddit | $0.001 / 호출 | JSON |
Reddit | $0.001 / 호출 | JSON |
Reddit | $0.001 / 호출 | JSON |
Reddit | $0.001 / 호출 | JSON |
질문
Authorization 헤더(Bearer)에 SandBase API 키를 넣고, 매개변수를 JSON 본문으로 담아 https://api.sandbase.ai/v1/api/reddit/app/search-typeahead에 POST 요청을 보내세요. 이 페이지의 Playground에서도 코드를 작성하지 않고 직접 테스트할 수 있습니다.
호출당 $0.001, SandBase 잔액에서 청구됩니다. 사용한 호출에 대해서만 요금이 부과되며, 구독은 없습니다.
필수: query (string). 선택: allow_nsfw (string), need_format (boolean) 및 safe_search (string). 이 페이지의 Parameters 표와 Playground에 모든 필드가 나와 있습니다.
같은 HTTP 요청에서 반환되는 JSON 응답입니다(동기식). 이 페이지의 README에 샘플 응답이 포함되어 있습니다.
아니요. Reddit App Search Typeahead은 SandBase를 통해 실행되므로, SandBase API 키 하나로 이 엔드포인트와 카탈로그의 다른 모든 API 및 모델을 사용할 수 있습니다. Reddit API 액세스를 별도로 신청할 필요는 없습니다.