Search notes API

Search notes

USD 0.010000 / استدعاء ناجح

المعرّف العام: social.tikhub.xiaohongshu.app.v2.search.notes · الإصدار 1

الأسعار

USD 0.010000 / استدعاء ناجح

البدء السريع

ابحث عن هذه الأداة باستخدام مفتاح 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": "Search notes"
}'

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\": \"Search notes\"\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": "Search notes"
}) });
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": {
        "ai_mode": {
          "description": "AI mode: 0=off, 1=on",
          "title": "Ai Mode",
          "type": "integer"
        },
        "keyword": {
          "description": "Search keyword",
          "title": "Keyword",
          "type": "string"
        },
        "note_type": {
          "description": "笔记类型/Note type: 不限, 视频笔记, 普通笔记, 直播笔记",
          "title": "Note Type",
          "type": "string"
        },
        "page": {
          "description": "Page number, start from 1",
          "title": "Page",
          "type": "integer"
        },
        "search_id": {
          "description": "Search ID for pagination",
          "title": "Search Id",
          "type": "string"
        },
        "search_session_id": {
          "description": "Search session ID for pagination",
          "title": "Search Session Id",
          "type": "string"
        },
        "sort_type": {
          "description": "Sort type",
          "title": "Sort Type",
          "type": "string"
        },
        "source": {
          "description": "Source",
          "title": "Source",
          "type": "string"
        },
        "time_filter": {
          "description": "发布时间筛选/Time filter: 不限, 一天内, 一周内, 半年内",
          "title": "Time Filter",
          "type": "string"
        }
      },
      "required": [
        "keyword"
      ],
      "type": "object"
    }
  },
  "required": [
    "queryParams"
  ],
  "type": "object"
}

مخطط المخرجات

{
  "type": "object"
}

أدوات من الفئة نفسها