Fetch Reddit APP Search Typeahead Suggestions API
Fetch Reddit APP Search Typeahead Suggestions
USD 0.001000 / llamada correcta
ID público: social.tikhub.reddit.app.fetch.search.typeahead · Versión 1
Precios
USD 0.001000 / llamada correcta
Inicio rápido
Busca esta herramienta con tu clave API e inspecciona el provider y el endpoint devueltos antes de ejecutarla.
Configura GLOOP_API_BASE con la dirección de tu API y GLOOP_API_KEY con tu clave del servidor.
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 Search Typeahead Suggestions"
}'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 Search Typeahead Suggestions\"\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 Search Typeahead Suggestions"
}) });
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());Documentación de API de herramientas · POST /v1/inspectEsquema de entrada
{
"additionalProperties": false,
"properties": {
"queryParams": {
"additionalProperties": false,
"properties": {
"allow_nsfw": {
"description": "Allow NSFW content: 0 or 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": "Whether to clean and format the data",
"title": "Need Format",
"type": "boolean"
},
"query": {
"description": "Search query",
"maxLength": 512,
"title": "Query",
"type": "string"
},
"safe_search": {
"description": "Safe search setting: unset, strict",
"enum": [
"unset",
"strict"
],
"title": "Safe Search",
"type": "string"
}
},
"required": [
"query"
],
"type": "object"
}
},
"required": [
"queryParams"
],
"type": "object"
}Esquema de salida
{
"type": "object"
}