Get details
Introduction
POST /v1/generations with Authorization: Bearer <ANYCAP_API_KEY>. Use type=social, model for the platform and input.operation for the query. Parameters and examples follow.
| Platform | Query | model | input.operation |
|---|---|---|---|
| Post details | instagram | post | |
| TikTok | Post details | tiktok | video |
| TikTok | App post details | tiktok | app_video |
| Douyin | Post details | douyin | douyin_video |
| Xiaohongshu | Image note | xiaohongshu | image_note |
| Xiaohongshu | Video note | xiaohongshu | video_note |
| WeChat Official Accounts | Article details | wechat_mp | article |
Instagram · Post details
Read one public Instagram post, reel or TV item by link. Send type: social, model: instagram and input.operation: post with the post link.
Request
curl -X POST https://api.anycap.io/v1/generations \ -H "Authorization: Bearer $ANYCAP_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 5b1d7e2a-8c34-4f6d-9a0e-2d7c4b6f8a13" \ -d '{"type":"social","model":"instagram","input":{"operation":"post","url":"https://www.instagram.com/p/DPwhVB-jo9k/"}}'type
socialmodel
instagraminput.operation
postinput.url
instagram.com /p/, /reel/ or /tv/ page; input.post_url is accepted as an aliasIdempotency-Key
Profile, story, explore and share-page links are rejected before any upstream call. The response is synchronous.
The connection key must be authorized for social.instagram.post.info. An unauthorized key returns 503 capability_unavailable before any upstream call and is not charged.
Response
{ "type": "social", "call": { "id": "5b1d7e2a-8c34-4f6d-9a0e-2d7c4b6f8a13", "state": "succeeded", "operation": "post", "url": "https://www.instagram.com/p/DPwhVB-jo9k/", "amount_microcredits": "9000000", "charged_microcredits": "9000000", "created_at": "2026-10-28T03:25:00Z", "completed_at": "2026-10-28T11:25:06+08:00", "post": { "id": "3742637871112032100", "shortcode": "DPwhVB-jo9k", "media_type": "image", "description": "I’ll never forget how excited I was in 2006 …", "cover_url": "https://instagram.fbne9-1.fna.fbcdn.net/v/562815025_18601398793054956_8673755740587648163_n.jpg", "play_url": "", "download_url": "", "width": 1080, "height": 1080, "created_at": 1760377223, "author": { "id": "11830955", "username": "taylorswift", "nickname": "Taylor Swift", "avatar_url": "https://instagram.fbne9-1.fna.fbcdn.net/v/811102599_18700319776054956_6854910356429154091_n.jpg" }, "digg_count": 3861440 }, "media_downloads": [ { "field": "post.cover_url", "source_url": "https://instagram.fbne9-1.fna.fbcdn.net/v/562815025_18601398793054956_8673755740587648163_n.jpg", "download_url": "https://api.anycap.io/v1/social-media/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "expires_at": "2026-10-28T05:25:06Z", "status": "ready" } ] }}call.post contains the post id and shortcode, media_type (image, video or carousel), caption, cover, author, publish time, dimensions and the counters Instagram returned. Carousel posts add ordered image_urls; video or reel posts add play_url. Missing counters, dimensions and duration are omitted, and a single-image post has no image_urls. Media links are temporary Instagram CDN URLs.
call.media_downloads adds Anycap download links while preserving the original third-party URLs. Only status=ready entries can be downloaded without an API key. Links expire 2 hours after call.completed_at, as shown in expires_at; reading the result does not renew them.
Errors
| HTTP | Body | What to do |
|---|---|---|
| 200 | call.state=succeeded | Read call.post; charge settled. |
| 202 | call.state=started / unknown | Keep call.id and read GET /v1/generations/{id} with the original connection key. Do not submit a new fetch. |
| 402 | error.code=insufficient_credits | Add credits and retry. Nothing was submitted or charged. |
| 404 / 502 / 503 | error.code | No customer charge. Codes: post_not_found, upstream_error, capability_unavailable (paused, not configured, or key not authorized). |
TikTok · Post details
Read one public TikTok post by link. Photo posts return every image in call.post.image_urls; video posts return playable media links.
Request
curl -X POST https://api.anycap.io/v1/generations \ -H "Authorization: Bearer $ANYCAP_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 8d0b2e44-9c52-4b5f-8a1d-3f6c7e9a0b21" \ -d '{"type":"social","model":"tiktok","input":{"url":"https://www.tiktok.com/@example_creator/photo/7000000000000000000"}}'type
socialmodel
tiktokinput.url
tiktok.com and its share linksIdempotency-Key
input.operation may be omitted; it defaults to video.
Response · photo post
{ "type": "social", "call": { "id": "8d0b2e44-9c52-4b5f-8a1d-3f6c7e9a0b21", "state": "succeeded", "operation": "video", "amount_microcredits": "4000000", "charged_microcredits": "4000000", "created_at": "2026-10-26T10:00:00Z", "post": { "id": "7000000000000000000", "cover_url": "https://cdn.example.com/cover.jpg", "image_urls": [ "https://cdn.example.com/1.jpg", "https://cdn.example.com/2.jpg", "https://cdn.example.com/3.jpg" ] }, "completed_at": "2026-10-26T10:00:00Z", "media_downloads": [ { "field": "post.image_urls[0]", "source_url": "https://cdn.example.com/1.jpg", "download_url": "https://api.anycap.io/v1/social-media/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "expires_at": "2026-10-26T12:00:00Z", "status": "ready" } ] }}image_urls follows the photo order, with one link per image (up to 100). Video posts may include play_url and download_url instead. Caption, author and counters appear when available. Missing counters and dimensions are omitted.
call.media_downloads adds Anycap download links while preserving the original third-party URLs. Only status=ready entries can be downloaded without an API key. Links expire 2 hours after call.completed_at, as shown in expires_at; reading the result does not renew them.
Errors
| HTTP | Body | What to do |
|---|---|---|
| 200 | call.state=succeeded | Read call.post; charge settled. |
| 202 | call.state=started / unknown | Keep call.id and read GET /v1/generations/{id} with the original connection key. Do not submit a new lookup. |
| 402 | error.code=insufficient_credits | Add credits and retry. Nothing was submitted or charged. |
| 404 / 502 / 503 | error.code | No customer charge. Codes: video_not_found, upstream_error, capability_unavailable. |
The same idempotency key replays the recorded result, even after the source is paused. Read results with the original connection key.
TikTok · App post details
Read one public TikTok post by link through the TikTok app data source. Set input.operation to app_video. Photo posts return every image in call.post.image_urls; video posts return playable media links.
Request
curl -X POST https://api.anycap.io/v1/generations \ -H "Authorization: Bearer $ANYCAP_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 8d0b2e44-9c52-4b5f-8a1d-3f6c7e9a0b21" \ -d '{"type":"social","model":"tiktok","input":{"operation":"app_video","url":"https://www.tiktok.com/@example_creator/photo/7000000000000000000"}}'type
socialmodel
tiktokinput.operation
app_videoinput.url
tiktok.com and its share linksIdempotency-Key
Response · photo post
{ "type": "social", "call": { "id": "8d0b2e44-9c52-4b5f-8a1d-3f6c7e9a0b21", "state": "succeeded", "operation": "app_video", "amount_microcredits": "4000000", "charged_microcredits": "4000000", "created_at": "2026-10-26T10:00:00Z", "post": { "id": "7000000000000000000", "cover_url": "https://cdn.example.com/cover.jpg", "image_urls": [ "https://cdn.example.com/1.jpg", "https://cdn.example.com/2.jpg", "https://cdn.example.com/3.jpg" ] }, "completed_at": "2026-10-26T10:00:00Z", "media_downloads": [ { "field": "post.image_urls[0]", "source_url": "https://cdn.example.com/1.jpg", "download_url": "https://api.anycap.io/v1/social-media/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "expires_at": "2026-10-26T12:00:00Z", "status": "ready" } ] }}image_urls follows the photo order, with one link per image (up to 100). Video posts may include play_url and download_url instead. Caption, author and counters appear when available. Missing counters and dimensions are omitted.
call.media_downloads adds Anycap download links while preserving the original third-party URLs. Only status=ready entries can be downloaded without an API key. Links expire 2 hours after call.completed_at, as shown in expires_at; reading the result does not renew them.
Errors
| HTTP | Body | What to do |
|---|---|---|
| 200 | call.state=succeeded | Read call.post; charge settled. |
| 202 | call.state=started / unknown | Keep call.id and read GET /v1/generations/{id} with the original connection key. Do not submit a new lookup. |
| 402 | error.code=insufficient_credits | Add credits and retry. Nothing was submitted or charged. |
| 404 / 502 / 503 | error.code | No customer charge. Codes: video_not_found, upstream_error, capability_unavailable. |
The same idempotency key replays the recorded result, even after the source is paused. Read results with the original connection key.
Douyin · Post details
Read one public Douyin post. Send a 19-digit input.aweme_id, or a canonical douyin.com/video / iesdouyin.com/share/video link (the numeric id is extracted locally, so no extra resolver call is billed); full copied share text is accepted in input.url, including an escaped colon (https\://); the Douyin link is extracted. Short v.douyin.com links use one direct share-link detail request, without an extra resolver or automatic Web fallback. input.need_anchor_info optionally asks for location, merchant and showcase anchors. The result carries the description, author, cover, playable video, duration, dimensions and engagement counts.
When a post extraction source is active, the same request can also return call.post.medias with video, images, audio or live streams, plus available quality variants. Media URLs expire quickly; send any returned headers when downloading. A variant with both video_url and audio_url needs separate downloads and merging. play_url is populated only from a directly playable video URL. This source accepts need_anchor_info for request compatibility but does not supply anchor details.
Request
curl -X POST https://api.anycap.io/v1/generations \ -H "Authorization: Bearer $ANYCAP_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 8c1d2e3f-4a5b-4c6d-8e9f-0a1b2c3d4e5f" \ -d '{"type":"social","model":"douyin","input":{"operation":"douyin_video","aweme_id":"7372484719365098803"}}'Use the same POST /v1/generations endpoint for short links or full share text: set input.url as shown below. Keep type=social, model=douyin and input.operation=douyin_video. Include one Douyin link per text, within 2048 UTF-8 bytes. A pasted https\:// is accepted; escape the backslash in JSON as https\\://. Existing aweme_id and canonical links remain supported; aweme_id takes priority. The same normalized link and Idempotency-Key reuse the original call; changing the link conflicts. Existing request formats and prices stay unchanged; see the billing and failure policy below. call.url contains the extracted link.
{ "type": "social", "model": "douyin", "input": { "operation": "douyin_video", "url": "7.43 复制打开抖音,看看【测试账号的作品】高能的一天。# 工作 https://v.douyin.com/UuKlXMDqr_A/ [email protected] 11/24 BTL:/ :5pm" }}type
socialmodel
douyininput.operation
douyin_videoinput.aweme_id
input.url; when both are sent the id winsinput.url
douyin.com/video/... or iesdouyin.com/share/video/...; also accepts v.douyin.com short linksinput.need_anchor_info
true / falsefalse; applies to item IDs and canonical links; share short links do not request anchorsIdempotency-Key
Response
{ "type": "social", "call": { "id": "8c1d2e3f-4a5b-4c6d-8e9f-0a1b2c3d4e5f", "state": "succeeded", "operation": "douyin_video", "aweme_id": "7372484719365098803", "amount_microcredits": "2000000", "charged_microcredits": "2000000", "created_at": "2026-11-02T03:20:00Z", "post": { "id": "7372484719365098803", "description": "你对我的好我一直记得", "cover_url": "https://p3-pc-sign.douyinpic.com/example-cover.jpg", "play_url": "https://v3-web.douyinvod.com/example-video.mp4", "duration_ms": 8010, "width": 1080, "height": 1920, "created_at": 1716540374, "author": { "id": "95823111667", "uid": "95823111667", "sec_uid": "MS4wLjABAAAAexample", "username": "L99612", "nickname": "萧萧不吃辣", "avatar_url": "https://p3-pc.douyinpic.com/example-avatar.jpg" }, "digg_count": 312986, "comment_count": 4071, "share_count": 79966, "collect_count": 19911 } }}call.post.author.uid is the original numeric user ID as a string. call.post.author.sec_uid is the original secured account ID; use it to match Douyin accounts and construct https://www.douyin.com/user/<sec_uid>. Both are omitted when not returned by the data source. Existing author.id and author.username retain their meanings and must not be used as sec_uid. A missing sec_uid does not imply that the numeric UID or handle is a homepage identifier.
call.post.play_url is the direct video link; media links are temporary Douyin CDN URLs. call.aweme_id is present for an id submission and also when a canonical link supplied the id. Short share links omit call.aweme_id; read the returned item ID from call.post.id. Counters, duration and dimensions are omitted when the platform does not report them.
Failure fields: HTTP status and error.details.state describe failure; error.code is the compatible machine-readable category, error.details.error_code is the recorded call code, and error.message / error.details.error_message carry the readable cause. error.details.call_id identifies the stored call. amount_microcredits is the quote and charged_microcredits is the actual charge (strings, 1000000 = 1 credit). Polling returns the same reason in call.error_message. The example below is a confirmed billable empty result (HTTP 404). Retry with the original Idempotency-Key to avoid another lookup or charge. The log response view enriches legacy response_facts without overwriting the saved archive or changing past charges.
{ "error": { "code": "video_not_found", "message": "The post is private and is not publicly accessible.", "request_id": "example-request-id", "reason": "douyin_lookup_failed", "details": { "call_id": "8c1d2e3f-4a5b-4c6d-8e9f-0a1b2c3d4e5f", "state": "failed", "error_code": "video_not_found", "error_message": "The post is private and is not publicly accessible.", "amount_microcredits": "2000000", "charged_microcredits": "2000000" } }}Errors
| HTTP | Body | What to do |
|---|---|---|
| 200 | call.state=succeeded | Read call.post; charge settled. |
| 202 | call.state=started / unknown | Keep call.id and read GET /v1/generations/{id} with the original connection key. Do not submit a new fetch. |
| 402 | error.code=insufficient_credits | Add credits and retry. Nothing was submitted or charged. |
| 404 / 502 / 503 | error.code | Read error.message and error.details.charged_microcredits; a confirmed billable empty result is charged. Codes: video_not_found, status_reviewing, upstream_error, capability_unavailable. HTTP 422 / status_reviewing means the post is under review; error.details.filter_reason preserves status_reviewing, and GET returns filter_reason. error.message/error.details.error_message contain the readable reason. |
Xiaohongshu · Image note
Read one public Xiaohongshu note by note link or note id through the Xiaohongshu app interface (app/v2). input.operation selects the note route: image_note (default) reads notes of either kind and returns a video note cover only; video_note reads video notes and returns the play link. When a note's type is video, call video_note with the same note id to obtain call.note.play_url. Only the app routes are exposed; the web note pages are not part of this capability.
When a post extraction source is active, the same note request may return call.note.medias with ordered images, video, audio and available variants. The image operation may then include a video URL. Media links expire quickly; send any returned headers when downloading. An id-only request is converted to a post link; links carrying access tokens should be supplied as the original URL.
Request
curl -X POST https://api.anycap.io/v1/generations \ -H "Authorization: Bearer $ANYCAP_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 8d0b2e44-9c52-4b5f-8a1d-3f6c7e9a0b21" \ -d '{"type":"social","model":"xiaohongshu","input":{"operation":"image_note","note_id":"697c0eee000000000a03c308"}}'type
socialmodel
xiaohongshuinput.operation
image_note or video_noteimage_note is the default when omittedinput.note_id
input.url; sending both is rejectedinput.url
xiaohongshu.com note links, xhslink.com and xhslink.cn share linksIdempotency-Key
Response
{ "type": "social", "call": { "id": "5c4a1d2e-9f3b-4a6c-8d7e-1b2c3d4e5f60", "state": "succeeded", "operation": "image_note", "note_id": "697c0eee000000000a03c308", "amount_microcredits": "11000000", "charged_microcredits": "11000000", "created_at": "2026-10-30T08:00:00Z", "note": { "id": "697c0eee000000000a03c308", "type": "normal", "title": "秋日通勤穿搭", "description": "通勤三件套,配色参考。", "cover_url": "https://sns-webpic-qc.xhscdn.com/cover.jpg", "image_urls": [ "https://sns-webpic-qc.xhscdn.com/1.jpg", "https://sns-webpic-qc.xhscdn.com/2.jpg" ], "created_at": 1759718400, "author": { "id": "5f0000000000000000000001", "nickname": "示例作者", "avatar_url": "https://sns-avatar-qc.xhscdn.com/avatar.jpg" }, "digg_count": 12000, "collect_count": 3456, "comment_count": 78 }, "completed_at": "2026-10-30T08:00:01Z", "media_downloads": [ { "field": "note.image_urls[0]", "source_url": "https://sns-webpic-qc.xhscdn.com/1.jpg", "download_url": "https://api.anycap.io/v1/social-media/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "expires_at": "2026-10-30T10:00:00Z", "status": "ready" } ] }}note.type is normal for an image note and video for a video note. note.image_urls follows the note order with one link per image (up to 100). On the app detail source, note.play_url is present only for video_note; a post extraction source may also provide it for image_note. Counters, duration and dimensions appear when the platform reports them, and compact counters such as 1.2万 are expanded to integers.
For the app detail source, call.media_downloads adds Anycap download links while preserving the original third-party URLs. Only status=ready entries can be downloaded without an API key. They expire 2 hours after call.completed_at, as shown in expires_at. Post extraction media instead uses the short-lived direct URLs and any returned download headers in call.note.medias.
Video note
curl -X POST https://api.anycap.io/v1/generations \ -H "Authorization: Bearer $ANYCAP_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 6b1f4c7e-2a3d-4e5f-8a9b-0c1d2e3f4a5b" \ -d '{"type":"social","model":"xiaohongshu","input":{"operation":"video_note","url":"http://xhslink.com/o/8GqargIxrko"}}'video_note accepts the same note_id and url fields and returns available video media plus the cover image. On the app detail source, an image note sent to video_note cannot be read; a post extraction source returns the available media for the post.
Errors
| HTTP | Body | What to do |
|---|---|---|
| 200 | call.state=succeeded | Read call.note; charge settled. |
| 202 | call.state=started / unknown | Keep call.id and read GET /v1/generations/{id} with the original connection key. Do not submit a new fetch. |
| 402 | error.code=insufficient_credits | Add credits and retry. Nothing was submitted or charged. |
| 404 / 502 / 503 | error.code | No customer charge. Codes: note_not_found, upstream_error, capability_unavailable. Read error.message; when a specific source reason is confirmed, error.details.error_message carries the same readable reason. |
The same idempotency key replays the recorded result, even after the source is paused. Read results with the original connection key.
WeChat Official Accounts · Article details
| Step | Method and path | Response |
|---|---|---|
| Discover the authorized operation | GET /v1/generations/models?type=social | 200; select model=wechat_mp, operation=article |
| Read an article | POST /v1/generations | 200 succeeded; 202 started/unknown |
| Read the saved call | GET /v1/generations/{call.id} | 200; inspect call.state |
Read a public WeChat article by URL using the H5 article detail operation.
curl https://api.anycap.io/v1/generations \ -H "Authorization: Bearer $ANYCAP_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ --max-time 120 \ -d '{"type":"social","model":"wechat_mp","input":{"operation":"article","url":"https://mp.weixin.qq.com/s/ARTICLE","raw":true}}'input.urlstring
input.operationstring
input.rawboolean
A successful response contains call.article with url, bizUin, itemIdx and content. Read content.title, author, nick_name, cdn_url, create_time, content_text, content_noencode, source_url and _content_type. mid and comment_id are strings; keep them as strings. Treat content_noencode as untrusted HTML.
Images are available in call.article.image_urls and the cover in call.article.cover_url. Each call.media_downloads item identifies its field (for example article.image_urls[0]), status, download_url and expires_at. Ready images have private signed download links valid until two hours after call completion. History reads do not extend expiry; expired or unavailable items have no download URL. Allow at least 30 seconds for article extraction; use a 120-second client timeout when preparing image downloads. The response does not include reading statistics or comment lists. raw=false preserves the same envelope and returns core content fields. Content types include article, immersive, video and unknown; HTML may be empty for non-article pages.
Image download fields
| Response field | Meaning |
|---|---|
| call.article.cover_url / image_urls | Normalized original image URLs; use media_downloads for saved downloads. |
| call.media_downloads[].field | Path relative to call; article.cover_url or article.image_urls[0]. Array indexes start at zero. |
| source_url | Original platform image URL, separate from the saved download link. |
| download_url | Private signed GET URL for the saved image. Returned only for ready items; its host may differ from the API host. |
| expires_at | Fixed UTC deadline, at most two hours after call.completed_at. History reads and replays do not renew it. |
| status | ready: available for download; unavailable: no saved copy or transfer/signing failed; expired: the deadline passed. The latter two omit download_url. |
Use the complete download_url unchanged with GET. Do not prepend the API origin, alter the signed query, switch to HEAD, or attach an Anycap Authorization header. Anyone holding the link can download before expiry; keep it private. The two-hour deadline applies to the saved download link, not the original source_url. Image-transfer failures do not change a successful article response.
# Set DOWNLOAD_URL to a ready item's complete download_url.curl --fail "$DOWNLOAD_URL" --output article-image.jpgSuccessful response (illustrative URLs)
{ "type": "social", "call": { "id": "8b8ab1ac-20ae-4d2a-8323-09d33a0f0540", "state": "succeeded", "operation": "article", "url": "https://mp.weixin.qq.com/s/ARTICLE", "article": { "url": "https://mp.weixin.qq.com/s/ARTICLE", "bizUin": 123456, "itemIdx": 1, "cover_url": "https://images.example.invalid/cover.jpg", "image_urls": [ "https://images.example.invalid/illustration.jpg" ], "content": { "title": "Example article", "nick_name": "Example account", "author": "Example author", "create_time": "2026-11-09 10:00", "content_text": "Example article text.", "_content_type": "article", "mid": "12345678901234567890", "comment_id": "9007199254740993" } }, "media_downloads": [ { "field": "article.cover_url", "source_url": "https://images.example.invalid/cover.jpg", "download_url": "https://downloads.example.invalid/cover.jpg?X-Amz-Date=20261109T020000Z&X-Amz-Expires=7200&X-Amz-Signature=EXAMPLE", "expires_at": "2026-11-09T04:00:00Z", "status": "ready" }, { "field": "article.image_urls[0]", "source_url": "https://images.example.invalid/illustration.jpg", "download_url": "https://downloads.example.invalid/illustration.jpg?X-Amz-Date=20261109T020000Z&X-Amz-Expires=7200&X-Amz-Signature=EXAMPLE", "expires_at": "2026-11-09T04:00:00Z", "status": "ready" } ], "amount_microcredits": "12000000", "charged_microcredits": "12000000", "created_at": "2026-11-09T01:59:48Z", "completed_at": "2026-11-09T02:00:00Z" }}HTTP 202 returns a started or unknown call; retrieve it with GET /v1/generations/{call.id}. GET returns HTTP 200 for a recorded call, so inspect call.state: succeeded, started, unknown or failed. Unknown is awaiting reconciliation, not proof of a background retry. Reuse the original request key for recovery. HTTP 404 with article_not_found means the article is unavailable; errors use an error envelope rather than call.