docs

One tool. One endpoint.

Both surfaces run the same code, so they return the same thing. Send share links exactly as you copied them — tracking parameters and xsec_token are handled.

mcp

Claude Code

claude mcp add --transport http linkdigest \
  https://linkdigest.dev/mcp \
  --header "Authorization: Bearer ld_live_..."

That registers one tool, digest_url(url, format). The agent calls it by itself whenever it meets a social link it cannot open, so you do not need to mention LinkDigest in your prompt.

Cursor

Add this to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "linkdigest": {
      "url": "https://linkdigest.dev/mcp",
      "headers": { "Authorization": "Bearer ld_live_..." }
    }
  }
}

rest

POST /api/v1/digest

curl -X POST https://linkdigest.dev/api/v1/digest \
  -H "Authorization: Bearer ld_live_..." \
  -H "Content-Type: application/json" \
  -d '{"url": "https://www.xiaohongshu.com/discovery/item/...", "format": "json"}'

format is json (default) or markdown.

Response fields

fieldmeaning
platformWhich site the link resolved to.
authorPost author's display name.
titlePost title, in its original language.
posted_atPublication date, YYYY-MM-DD.
captionThe post's own caption or description text.
transcriptArray of { t, text } — seconds and speech. Empty when the post has no speech.
ocr_textText visible on screen: burned-in captions, UI labels, slide text.
imagesArray of { description, ocr } — one entry per image on image posts.
key_pointsThe substantive takeaways, in the post's original language.
raw_markdownThe whole digest pre-rendered as Markdown.
transcript_sourcenative_captions, asr, or none — how the transcript was obtained.
degradedAnything that did not work fully, in plain words. Empty on a clean run.

Status codes

codemeaning
401Missing or revoked API key.
422The link could not be fetched — blocked, removed, or login-walled.
429Plan allowance used up. Cached links never count.
502The digest engine failed. Safe to retry.
504The media took too long to process.