Fetch image search API

Fetch image search

USD 0.010000 / chiamata riuscita

ID pubblico: social.tikhub.douyin.search.fetch.image.search · Versione 1

Prezzi

USD 0.010000 / 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 image search"
}'

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 image search\"\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 image search"
}) });
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": {
    "body": {
      "additionalProperties": false,
      "properties": {
        "backtrace": {
          "description": "翻页回溯标识,用于翻页,从上一次请求返回的响应中获取 / Backtrace for pagination, obtained from the last response",
          "title": "Backtrace",
          "type": "string"
        },
        "content_type": {
          "description": "内容类型:0=不限 1=视频 2=图片 3=文章 / Content type: 0=All, 1=Video, 2=Picture, 3=Article",
          "title": "Content Type",
          "type": "string"
        },
        "cursor": {
          "description": "偏移游标,用于翻页,从上一次请求返回的响应中获取 / Offset cursor for pagination, obtained from the last response",
          "title": "Cursor",
          "type": "integer"
        },
        "filter_duration": {
          "description": "视频时长过滤:0=不限 0-1=一分钟以内 1-5=一到五分钟 5-10000=五分钟以上 / Video duration filter: 0=Unlimited, 0-1=Within 1 minute, 1-5=1 to 5 minutes, 5-10000=More than 5 minutes",
          "title": "Filter Duration",
          "type": "string"
        },
        "keyword": {
          "description": "关键词 / Keyword",
          "title": "Keyword",
          "type": "string"
        },
        "publish_time": {
          "description": "发布时间筛选:0=不限 1=最近一天 7=最近一周 180=最近半年 / Publish time filter: 0=Unlimited, 1=Last day, 7=Last week, 180=Last half year",
          "title": "Publish Time",
          "type": "string"
        },
        "search_id": {
          "description": "搜索ID,用于翻页,从上一次请求返回的响应中获取 / Search ID for pagination, obtained from the last response",
          "title": "Search Id",
          "type": "string"
        },
        "sort_type": {
          "description": "排序方式:0=综合排序 1=最多点赞 2=最新发布 / Sort type: 0=Comprehensive, 1=Most Likes, 2=Latest",
          "title": "Sort Type",
          "type": "string"
        }
      },
      "title": "ImageSearchRequest",
      "type": "object"
    },
    "queryParams": {
      "additionalProperties": false,
      "properties": {},
      "type": "object"
    }
  },
  "required": [],
  "type": "object"
}

Schema di output

{
  "type": "object"
}

Strumenti della stessa categoria