Fetch Reddit APP Dynamic Search Results API

Fetch Reddit APP Dynamic Search Results

USD 0.001000 / chiamata riuscita

ID pubblico: social.tikhub.reddit.app.fetch.dynamic.search · Versione 1

Prezzi

USD 0.001000 / chiamata riuscita

Avvio rapido

Cerca questo strumento con la tua chiave API, poi esamina provider ed endpoint restituiti prima di eseguirlo.

Imposta GLOOP_API_BASE con il tuo indirizzo API e GLOOP_API_KEY con la chiave lato server.

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());
Documentazione API degli strumenti · POST /v1/inspect

Schema di input

{
  "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"
}

Schema di output

{
  "type": "object"
}

Strumenti della stessa categoria