TAPSAVE OPEN API

Подключите анализ медиа через один endpoint

Анализируйте публичные медиа через стабильный REST endpoint. Один кредит списывается только при возврате доступных ресурсов.

REST / JSONОдин endpoint анализаБез списания при ошибке
POST /openapi/parse
curl -X POST https://api.videotool.cc/openapi/parse \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://..."}'
200 OK1 кредит

01 · Быстрый старт

Отправьте запрос анализа

Добавьте API-ключ в заголовок и отправьте один публичный URL в JSON.

curl -X POST https://api.videotool.cc/openapi/parse \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://..."}'

02 · Аутентификация

Аутентификация по API-ключу

Передавайте X-API-Key в каждом запросе. Ключ можно просмотреть или обновить в консоли.

X-API-KeyYOUR_API_KEY

Храните API-ключ на сервере и не публикуйте его в приложениях или репозиториях.

03 · Endpoint

Доступный endpoint

POST/openapi/parseОдин URL

Анализ одного публичного URL

Отправьте URL публичной публикации или видео. Один кредит списывается после получения доступных ресурсов.

urlstring · requiredURL публичной публикации или видео

04 · Ответ

Успешный ответ

Успешный вызов возвращает ParseResult в AjaxResult с видео, изображениями, аудио и текстом.

{
  "code": 200,
  "msg": "操作成功",
  "data": {
    "resultCode": 0,
    "hasResource": true,
    "resourceType": 200,
    "descList": ["..."],
    "imgList": [],
    "videoList": [],
    "audioList": []
  }
}

Response fields

Fields can be empty depending on the source platform and resource type. Check code, data.resultCode, and data.hasResource before reading a resource list.

codenumberBusiness status code; 200 means the request succeeded.
msgstringProcessing message; failures include a displayable reason.
data.resultCodenumberParse result code; 0 means parsing succeeded.
data.resultMsgstring | nullParse result message; normally null on success.
data.hasResourcebooleanWhether usable media was returned; one credit is charged only when true.
data.resourceTypenumberResource type returned by the parser; use the resource lists to identify actual content.
data.parseBynumber | nullParser source or strategy identifier for display and diagnostics only.
data.ffmpegCmdstring | nullFFmpeg command template for source-required transcoding; normal browser playback does not run it.
data.headersobjectHeaders that can be required for direct raw-media requests; normally unnecessary with webProxyUrl.
data.canWatchAdbooleanWhether ad-based parse entitlement is supported; Open API clients normally do not use it.
data.showProxy / data.proxyBaseUrlboolean / string | nullOrdinary download-proxy settings, separate from the Web display proxy.
data.timestampnumberMillisecond timestamp for this response; required in a web proxy URL.
data.webProxyUrlstring | nullWeb display proxy base URL; append /res/dl when present, otherwise use the resource URL.
data.packageDownloadUrlstring | nullPackage-download base URL, used only for /res/zip and generated /static paths.
data.vipProxyBaseUrl / data.vipDownloadStatusstring | nullVIP fast-download fields; standard Open API integrations should not depend on them.
data.vipPackageDownloadUrl / data.vipPackageDownloadStatusstring | nullVIP package-download fields; standard Open API integrations should not depend on them.
data.descList[]string[] | nullOriginal caption, title, or supplemental descriptions.
data.authorstring | nullXiaohongshu author nickname when available.
data.publishTimestring | nullXiaohongshu publish time in yyyy-MM-dd HH:mm:ss format.
data.publishTimestampnumber | nullXiaohongshu publish timestamp in seconds.
data.imgList[].url / origUrlstringImage resource URL and optional original source URL.
data.imgList[].webImgHashstring | nullWeb image proxy signature; fall back to imgHash only when it is absent.
data.imgList[].videoUrlstring | nullVideo linked to an image item when available.
data.imgList[].webVideoHashstring | nullWeb proxy signature for an image item linked video.
data.videoList[].idstring | nullVideo resource identifier for rendering or deduplication.
data.videoList[].url / origUrlstringVideo resource URL and optional original source URL.
data.videoList[].width / heightstring | nullVideo dimensions in px when supplied by the source.
data.videoList[].webVideoHashstring | nullWeb video proxy signature; fall back to videoHash only when absent.
data.videoList[].audioUrlstring | nullSeparate audio resource URL when available.
data.videoList[].webAudioHashstring | nullWeb audio proxy signature; fall back to audioHash only when absent.
data.videoList[].descstring | nullSupplemental description for the video resource.
data.audioList[].url / origUrlstringStandalone audio URL and optional original source URL.

05 · Proxy URLs

Use the web display proxy URL

When webProxyUrl is present, browsers can use a proxied resource URL to handle CORS or origin hotlink restrictions. Use the raw resource URL when it is empty.

const data = result.data;
const video = data.videoList[0];
const rawUrl = video.url;

const displayUrl = data.webProxyUrl
  ? data.webProxyUrl.replace(/\/+$/, '')
    + '/res/dl?url=' + encodeURIComponent(rawUrl)
    + '&hash=' + (video.webVideoHash || video.videoHash)
    + '&timestamp=' + data.timestamp
  : rawUrl;

// <video src={displayUrl} controls />
Signature and resource rules

Use webImgHash (falling back to imgHash) for images, webVideoHash (falling back to videoHash) for videos, and webAudioHash (falling back to audioHash) for video audio. Use only the hash and timestamp returned by the same parse response. Do not use webProxyUrl for /res/zip package downloads.

06 · Ошибки

Коды бизнес-ошибок

codeЗначениеСписание
400URL отсутствует или неверенБез списания
401API-ключ отсутствует, неверен или отключёнБез списания
403Недостаточно кредитовБез списания
422Нет доступных ресурсовБез списания
500Ошибка сервиса анализаБез списания

07 · Оплата

Оплачиваются только успешные результаты

1кредит списывается при наличии доступных ресурсов
0кредитов списывается при ошибке или пустом результате
Текущий объём

Open API предоставляет только POST /openapi/parse для одного URL. Пакетных, capabilities, идемпотентных и rate-limit endpoints нет.