Fetch Reddit APP Dynamic Search Results API

Fetch Reddit APP Dynamic Search Results

USD 0.001000 / 성공한 호출

공개 ID: social.tikhub.reddit.app.fetch.dynamic.search · 버전 1

가격

USD 0.001000 / 성공한 호출

빠른 시작

API 키로 이 도구를 검색한 다음 반환된 provider와 endpoint의 사양을 확인한 후 실행하세요.

GLOOP_API_BASE에 API 주소를, GLOOP_API_KEY에 서버 측 키를 설정하세요.

curl

curl --fail-with-body "${GLOOP_API_BASE%/}/v1/discover" \
  -H "Authorization: Bearer $GLOOP_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "limit": 5,
  "query": "Fetch Reddit APP Dynamic Search Results"
}'

Python

import os, json, urllib.request

url = os.environ['GLOOP_API_BASE'].rstrip('/') + "/v1/discover"
headers = {'Authorization': 'Bearer ' + os.environ['GLOOP_API_KEY']}
headers['Content-Type'] = 'application/json'
data = "{\n  \"limit\": 5,\n  \"query\": \"Fetch Reddit APP Dynamic Search Results\"\n}".encode('utf-8')
request = urllib.request.Request(url, data=data, headers=headers)
with urllib.request.urlopen(request) as response:
    print(json.load(response))

Node.js

const url = process.env.GLOOP_API_BASE.replace(/\/$/, '') + "/v1/discover";
const headers = { Authorization: `Bearer ${process.env.GLOOP_API_KEY}` };
headers['Content-Type'] = 'application/json';
const response = await fetch(url, { method: 'POST', headers, body: JSON.stringify({
  "limit": 5,
  "query": "Fetch Reddit APP Dynamic Search Results"
}) });
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());
도구 API 문서 · POST /v1/inspect

입력 스키마

{
  "additionalProperties": false,
  "properties": {
    "queryParams": {
      "additionalProperties": false,
      "properties": {
        "after": {
          "description": "Pagination cursor; use pageInfo.endCursor when need_format=true",
          "maxLength": 4096,
          "title": "After",
          "type": "string"
        },
        "allow_nsfw": {
          "description": "Allow NSFW content: 0, 1",
          "enum": [
            "0",
            "1"
          ],
          "title": "Allow Nsfw",
          "type": "string"
        },
        "language": {
          "description": "Preferred response language as an IETF language tag; default: en-US",
          "maxLength": 16,
          "minLength": 2,
          "title": "Language",
          "type": "string"
        },
        "need_format": {
          "description": "When true, data contains only children and pageInfo with redundant result fields removed; false preserves the original search structure",
          "title": "Need Format",
          "type": "boolean"
        },
        "query": {
          "description": "Search keywords or expression; post searches may match only some keywords. Supports AND, OR, NOT, grouping, quoted phrases and field filters",
          "maxLength": 512,
          "minLength": 1,
          "title": "Query",
          "type": "string"
        },
        "safe_search": {
          "description": "Safe search setting: unset, strict",
          "enum": [
            "unset",
            "strict"
          ],
          "title": "Safe Search",
          "type": "string"
        },
        "search_type": {
          "description": "搜索类型/Search type: post(帖子), community(社区), comment(评论), media(媒体), people(用户)",
          "enum": [
            "post",
            "community",
            "comment",
            "media",
            "people"
          ],
          "title": "Search Type",
          "type": "string"
        },
        "sort": {
          "description": "排序方式(仅适用于post/comment/media)/Sort method (only for post/comment/media): RELEVANCE(相关性), HOT(热门), TOP(最受欢迎), NEW(最新), COMMENTS(评论数,仅post)",
          "enum": [
            "RELEVANCE",
            "HOT",
            "TOP",
            "NEW",
            "COMMENTS"
          ],
          "title": "Sort",
          "type": "string"
        },
        "time_range": {
          "description": "时间范围(仅适用于post/media)/Time range (only for post/media): all(所有时间), year(去年), month(上月), week(上周), day(今天), hour(过去1小时)",
          "enum": [
            "all",
            "year",
            "month",
            "week",
            "day",
            "hour"
          ],
          "title": "Time Range",
          "type": "string"
        }
      },
      "required": [
        "query"
      ],
      "type": "object"
    }
  },
  "required": [
    "queryParams"
  ],
  "type": "object"
}

출력 스키마

{
  "type": "object"
}

같은 카테고리의 도구