{"openapi":"3.1.0","info":{"title":"API.SH: Douyin","version":"1.0.0","description":"The Douyin API from API.SH: public Douyin data as clean JSON. Every endpoint is a GET with query parameters and your key in the x-api-key header. Calls that run cost the credits shown (x-credits): successes, and lookups that found nothing (404). Refused calls and errors on our side are free. Docs: https://api.sh/docs · Every platform: https://api.sh/openapi.json","contact":{"name":"API.SH support","email":"support@api.sh","url":"https://api.sh/contact"},"termsOfService":"https://api.sh/legal/terms"},"servers":[{"url":"https://api.api.sh"}],"security":[{"apiKey":[]}],"tags":[{"name":"Account","description":"Your balance, usage, logs and past responses. Free."},{"name":"Douyin","description":"6 endpoints (social)","x-slug":"douyin","x-domains":["douyin.com"]}],"paths":{"/v1/account":{"get":{"operationId":"getAccount","tags":["Account"],"summary":"Balance, plan, spend and spend limits","description":"Credits by bucket (free monthly, plan, pay-as-you-go), the plan, credits spent today and this month (UTC), your spend limits and the key used. Free: costs no credits.","responses":{"200":{"description":"Account","content":{"application/json":{"example":{"success":true,"account":{"id":"8f0c…","status":"active","unlimited":false},"credits":{"total":41250,"free":100,"plan":0,"payg":41150,"free_resets_at":"2026-11-01T00:00:00Z"},"plan":null,"spend":{"today":120,"this_month":3400,"daily_limit":5000,"monthly_limit":null,"period":"UTC"},"key":{"id":"…","name":"production","prefix":"ash_li","created_at":"2026-10-01T00:00:00Z"}}}}},"401":{"description":"Missing, invalid, revoked or expired API key. Not charged. See https://api.sh/docs/errors#401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account/usage":{"get":{"operationId":"getAccountUsage","tags":["Account"],"summary":"Usage per day and per endpoint","description":"Calls, errors and credits per UTC day, and the top endpoints by credits. Free. Add output=csv for the daily rows as CSV.","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":90,"default":30}},{"$ref":"#/components/parameters/output"}],"responses":{"200":{"description":"Usage","content":{"application/json":{"schema":{"type":"object"}},"text/csv":{"schema":{"type":"string"}}}},"401":{"description":"Missing, invalid, revoked or expired API key. Not charged. See https://api.sh/docs/errors#401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/account/logs":{"get":{"operationId":"listAccountLogs","tags":["Account"],"summary":"Your calls of the last 30 days","description":"Newest first. Filter by status, route prefix, key or time; page with `before` (the `next` value). Add output=csv|ndjson to download (up to 5,000 rows per request; the next cursor is in the x-next-cursor header). Free.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":500,"default":50}},{"name":"status","in":"query","required":false,"description":"ok, error, or an HTTP status like 502.","schema":{"type":"string"}},{"name":"route","in":"query","required":false,"description":"Route prefix, e.g. /tiktok/v1","schema":{"type":"string"}},{"name":"key","in":"query","required":false,"description":"Only calls made with this key id.","schema":{"type":"string","format":"uuid"}},{"name":"since","in":"query","required":false,"description":"ISO time.","schema":{"type":"string","format":"date-time"}},{"name":"before","in":"query","required":false,"description":"Cursor from `next`.","schema":{"type":"string"}},{"$ref":"#/components/parameters/output"}],"responses":{"200":{"description":"Calls","content":{"application/json":{"schema":{"type":"object"}},"text/csv":{"schema":{"type":"string"}},"application/x-ndjson":{"schema":{"type":"string"}}}},"401":{"description":"Missing, invalid, revoked or expired API key. Not charged. See https://api.sh/docs/errors#401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/results/{request_id}":{"get":{"operationId":"getResult","tags":["Account"],"summary":"Fetch a past response again, free","description":"The exact response a call returned, for 30 days after the call, at no cost. Use the call's x-request-id. Supports output=csv|ndjson.","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/output"},{"$ref":"#/components/parameters/records"}],"responses":{"200":{"description":"The stored response (headers: x-refetch: 1, x-original-time, x-original-route).","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Not found, or not public. A lookup that ran costs the endpoint's price (credits_used says); an unknown route is free.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Older than 30 days.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/douyin/v1/hot":{"get":{"operationId":"douyinHot","summary":"Douyin hot search list","description":"Douyin's hot-search board (about 50 entries): position, phrase, heat value, label, video count, event time, cover and link, plus the trending list.\n\nEvery response includes `credits_used`: the credits this call cost.\n\nPrice: 1 credit per successful call. Docs: https://api.sh/docs/douyin-hot","tags":["Douyin"],"x-credits":1,"parameters":[{"$ref":"#/components/parameters/raw"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/fresh"},{"$ref":"#/components/parameters/output"},{"$ref":"#/components/parameters/records"}],"responses":{"200":{"description":"The data as JSON (or CSV / NDJSON with `output`).","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"},"x-credits-used":{"$ref":"#/components/headers/x-credits-used"},"x-credits-remaining":{"$ref":"#/components/headers/x-credits-remaining"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"active_time":"2026-11-04 13:37:24","count":51,"items":[{"position":null,"word":"努力让这条母亲河越来越美","hot_value":0,"label":0,"video_count":null,"event_time":null,"sentence_id":"2728343","group_id":null,"cover":null,"url":"https://www.douyin.com/hot/2728343"},{"position":1,"word":"一句你好胜过千言万语","hot_value":12151211,"label":17,"video_count":1,"event_time":"2026-11-03T07:02:26.000Z","sentence_id":"2727230","group_id":"6802521707555853582","cover":"https://p11-sign.douyinpic.com/tos-cn-p-0015/owDIeAGQYfOEfLt3Xy6RfGoHAgrhJnhgL14fIC~noop.jpeg?lk3s=bfd515bb&x-expires=1793790000&x-signature…","url":"https://www.douyin.com/hot/2727230"},"… 49 more"],"trending":[{"position":null,"word":"最强厄尔尼诺将明显影响我国","hot_value":0,"label":0,"video_count":7,"event_time":"2026-11-03T03:41:54.000Z","sentence_id":"2727092","group_id":"7702085541613458714","cover":"https://p3-sign.douyinpic.com/tos-cn-p-0015c000-ce/oEHfIOEDCOfJAp5D7VuSB9UQfwFg67A04xDLzg~noop.jpeg?lk3s=bfd515bb&x-expires=1793790000&x-sig…","url":"https://www.douyin.com/hot/2727092"},{"position":null,"word":"金价回落消费者趁机购金","hot_value":0,"label":0,"video_count":1,"event_time":"2026-11-03T12:26:57.000Z","sentence_id":"2727919","group_id":"7703495442274211098","cover":"https://p26-sign.douyinpic.com/tos-cn-p-0015c000-ce/oEpdqEQ2JEDSwGAsIQvAB0BTqnFQ96yEfLUpfY~noop.jpeg?lk3s=bfd515bb&x-expires=1793790000&x-si…","url":"https://www.douyin.com/hot/2727919"},"… 3 more"],"cached":false,"credits_used":1}},"text/csv":{"schema":{"type":"string"}},"application/x-ndjson":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"404":{"$ref":"#/components/responses/E404"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"}}}},"/douyin/v1/live":{"get":{"operationId":"douyinLive","summary":"Douyin live room","description":"A Douyin live room: whether it is on air (live, ended or preparing), its title, viewer and like counts, cover, the streamer (id, sec_uid, nickname, avatar, profile link) and, while live, the stream addresses (FLV and HLS by quality). The room's full record is under raw.\n\nEvery response includes `credits_used`: the credits this call cost.\n\nPrice: 1 credit per successful call. Docs: https://api.sh/docs/douyin-live","tags":["Douyin"],"x-credits":1,"parameters":[{"name":"id","in":"query","required":true,"description":"The room number in live.douyin.com/<number>, or that link.","schema":{"type":"string"},"example":"80017709309"},{"$ref":"#/components/parameters/raw"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/fresh"},{"$ref":"#/components/parameters/output"},{"$ref":"#/components/parameters/records"}],"responses":{"200":{"description":"The data as JSON (or CSV / NDJSON with `output`).","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"},"x-credits-used":{"$ref":"#/components/headers/x-credits-used"},"x-credits-remaining":{"$ref":"#/components/headers/x-credits-remaining"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"id":"80017709309","room_id":"7703708057486117666","url":"https://live.douyin.com/80017709309","live":false,"status":"ended","title":"美好生活，尽在东方甄选~","viewers":0,"likes":0,"cover":null,"started_at":null,"streamer":{"uid":"2384194153219051","sec_uid":"MS4wLjABAAAAcud_llwUN1kpfpzeb3Xqbq8nsRwU7lxVzg3OSv31hNMPz95UspEw1L53dX-UDrE4","nickname":"东方甄选","avatar":"https://p11.douyinpic.com/aweme/100x100/aweme-avatar/tos-cn-avt-0015_ee06287c378b803c3ce54e33f5b9cfd2.jpeg?from=3067671334","url":"https://www.douyin.com/user/MS4wLjABAAAAcud_llwUN1kpfpzeb3Xqbq8nsRwU7lxVzg3OSv31hNMPz95UspEw1L53dX-UDrE4"},"streams":null,"cached":false,"credits_used":1}},"text/csv":{"schema":{"type":"string"}},"application/x-ndjson":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"404":{"$ref":"#/components/responses/E404"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"}}}},"/douyin/v1/music":{"get":{"operationId":"douyinMusic","summary":"Douyin sound","description":"A Douyin sound (music): title, author, album, duration, how many videos use it, cover, owner, artists and its play URL.\n\nEvery response includes `credits_used`: the credits this call cost.\n\nPrice: 1 credit per successful call. Docs: https://api.sh/docs/douyin-music","tags":["Douyin"],"x-credits":1,"parameters":[{"name":"id","in":"query","required":true,"description":"Douyin music id, or a douyin.com/music/<id> link.","schema":{"type":"string"},"example":"7701507696956148499"},{"$ref":"#/components/parameters/raw"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/fresh"},{"$ref":"#/components/parameters/output"},{"$ref":"#/components/parameters/records"}],"responses":{"200":{"description":"The data as JSON (or CSV / NDJSON with `output`).","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"},"x-credits-used":{"$ref":"#/components/headers/x-credits-used"},"x-credits-remaining":{"$ref":"#/components/headers/x-credits-remaining"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"id":"7701507696956148499","title":"@周小闹（胡闹）创作的原声","author":"周小闹（胡闹）","album":null,"duration_s":76,"original":false,"original_sound":true,"user_count":286,"play_url":"https://sf6-cdn-tos.douyinstatic.com/obj/ies-music/7701507836513192746.mp3","cover":"https://p3-pc.douyinpic.com/aweme/1080x1080/aweme-avatar/tos-cn-avt-0015_58b538bb60be9b7b9c038e20c43a559e.jpeg?from=889713528","owner":{"uid":"3559550882417260","sec_uid":"MS4wLjABAAAAJ7nE9JTFdli_ghgQeHayeYNOT_yc89IJeYUR3o0dbOI-8nIoGVPoMYVFDuNbeLq_","nickname":"周小闹（胡闹）","url":"https://www.douyin.com/user/MS4wLjABAAAAJ7nE9JTFdli_ghgQeHayeYNOT_yc89IJeYUR3o0dbOI-8nIoGVPoMYVFDuNbeLq_"},"artists":[],"url":"https://www.douyin.com/music/7701507696956148499","cached":false,"credits_used":1}},"text/csv":{"schema":{"type":"string"}},"application/x-ndjson":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"404":{"$ref":"#/components/responses/E404"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"}}}},"/douyin/v1/user":{"get":{"operationId":"douyinUser","summary":"Douyin user profile","description":"A Douyin account by sec_uid: uid, Douyin id, nickname, bio, avatar, followers, following, likes received, video count, favorites count, verification, IP location, city, gender, age and live status. Douyin does not list an account's videos or answer keyword searches for logged-out visitors, so neither is offered.\n\nEvery response includes `credits_used`: the credits this call cost.\n\nPrice: 1 credit per successful call. Docs: https://api.sh/docs/douyin-user","tags":["Douyin"],"x-credits":1,"parameters":[{"name":"sec_uid","in":"query","required":false,"description":"The account's sec_uid (douyin.com/user/<sec_uid>), or pass url.","schema":{"type":"string"},"example":"MS4wLjABAAAAJ7nE9JTFdli_ghgQeHayeYNOT_yc89IJeYUR3o0dbOI-8nIoGVPoMYVFDuNbeLq_"},{"name":"url","in":"query","required":false,"description":"A douyin.com/user/<sec_uid> link.","schema":{"type":"string"}},{"$ref":"#/components/parameters/raw"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/fresh"},{"$ref":"#/components/parameters/output"},{"$ref":"#/components/parameters/records"}],"responses":{"200":{"description":"The data as JSON (or CSV / NDJSON with `output`).","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"},"x-credits-used":{"$ref":"#/components/headers/x-credits-used"},"x-credits-remaining":{"$ref":"#/components/headers/x-credits-remaining"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"uid":"3559550882417260","sec_uid":"MS4wLjABAAAAJ7nE9JTFdli_ghgQeHayeYNOT_yc89IJeYUR3o0dbOI-8nIoGVPoMYVFDuNbeLq_","unique_id":"27204273137","nickname":"周小闹（胡闹）","signature":"小满包房，吴经理、杨经理10年前的故事！\n商务V：zhiboshangwu123\n大号@周小闹 \n小号@周小小闹（大学宿舍） \n小小号@小闹养鹅记 \n小小小号@周小闹（纯闹）","avatar":"https://p3-pc.douyinpic.com/aweme/1080x1080/aweme-avatar/tos-cn-avt-0015_58b538bb60be9b7b9c038e20c43a559e.jpeg?from=2956013662","followers":3469597,"following":13,"likes_received":77820461,"videos_count":46,"favorites_count":960,"verified":null,"ip_location":"IP属地：海南","city":null,"country":null,"gender":0,"age":18,"is_live":false,"room_id":null,"url":"https://www.douyin.com/user/MS4wLjABAAAAJ7nE9JTFdli_ghgQeHayeYNOT_yc89IJeYUR3o0dbOI-8nIoGVPoMYVFDuNbeLq_","cached":false,"credits_used":1}},"text/csv":{"schema":{"type":"string"}},"application/x-ndjson":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"404":{"$ref":"#/components/responses/E404"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"}}}},"/douyin/v1/video":{"get":{"operationId":"douyinVideo","summary":"Douyin video details","description":"One Douyin video (or image post): description, date, author (uid, sec_uid, Douyin id, nickname, avatar), likes, comments, shares, collects, duration, size, cover, the no-watermark play URL (and every bitrate), the watermarked download URL, images of image posts, music, hashtags and IP location.\n\nEvery response includes `credits_used`: the credits this call cost.\n\nPrice: 1 credit per successful call. Docs: https://api.sh/docs/douyin-video","tags":["Douyin"],"x-credits":1,"parameters":[{"name":"aweme_id","in":"query","required":false,"description":"Video id (douyin.com/video/<id>), or pass url.","schema":{"type":"string"},"example":"7701507787922410570"},{"name":"url","in":"query","required":false,"description":"A douyin.com/video/<id> link.","schema":{"type":"string"}},{"$ref":"#/components/parameters/raw"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/fresh"},{"$ref":"#/components/parameters/output"},{"$ref":"#/components/parameters/records"}],"responses":{"200":{"description":"The data as JSON (or CSV / NDJSON with `output`).","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"},"x-credits-used":{"$ref":"#/components/headers/x-credits-used"},"x-credits-remaining":{"$ref":"#/components/headers/x-credits-remaining"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}},"text/csv":{"schema":{"type":"string"}},"application/x-ndjson":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"404":{"$ref":"#/components/responses/E404"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"}}}},"/douyin/v1/video/comments":{"get":{"operationId":"douyinVideoComments","summary":"Douyin video comments","description":"Comments on a Douyin video (20 per page by default): text, date, likes, reply count, IP location, author, images and stickers, plus the total. With `comment_id`, the replies to that comment. Pass `next_cursor` back as `cursor`; null on the last page.\n\nEvery response includes `credits_used`: the credits this call cost.\n\nPrice: 1 credit per successful call. Docs: https://api.sh/docs/douyin-video-comments","tags":["Douyin"],"x-credits":1,"parameters":[{"name":"aweme_id","in":"query","required":false,"description":"Video id, or pass url.","schema":{"type":"string"},"example":"7701507787922410570"},{"name":"url","in":"query","required":false,"description":"A douyin.com/video/<id> link.","schema":{"type":"string"}},{"name":"comment_id","in":"query","required":false,"description":"A comment's cid: list its replies instead.","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Pass `next_cursor` from the previous response.","schema":{"type":"string"}},{"name":"count","in":"query","required":false,"description":"Comments per page, 1-50 (default 20).","schema":{"type":"integer"}},{"$ref":"#/components/parameters/raw"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/fresh"},{"$ref":"#/components/parameters/output"},{"$ref":"#/components/parameters/records"}],"responses":{"200":{"description":"The data as JSON (or CSV / NDJSON with `output`).","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"},"x-credits-used":{"$ref":"#/components/headers/x-credits-used"},"x-credits-remaining":{"$ref":"#/components/headers/x-credits-remaining"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{"aweme_id":"7701507787922410570","total":7891,"count":20,"next_cursor":"20","comments":[{"cid":"7701643255738483513","text":"周岩嘴上:这个野路子真把这里当野人餐厅了\n周岩手上:再来点再来点","created_at":"2026-10-28T09:09:18.000Z","likes":5329,"reply_count":11,"ip_location":"山东","user":{"uid":"7559128647309100089","sec_uid":"MS4wLjABAAAAHP1ML2GU3AcJIwQkChDNTEBjDuYvKPj-Mz7D1rABNi3OaDdDc-UYnWwAUrIEvq_U","unique_id":"96919516163","nickname":"大转走长街","avatar":"https://p3-pc.douyinpic.com/aweme/100x100/aweme-avatar/tos-cn-i-0813c000-ce_oI3ZBMKEAh7FAIFEiFFUA8BDgaQGAJWoffsBUe.jpeg?from=2064092626","verified":null,"url":"https://www.douyin.com/user/MS4wLjABAAAAHP1ML2GU3AcJIwQkChDNTEBjDuYvKPj-Mz7D1rABNi3OaDdDc-UYnWwAUrIEvq_U"},"reply_to_cid":null,"reply_to_user":null,"images":[],"sticker":"https://p11-sign.douyinpic.com/obj/douyin-user-image-file/9182600675f668b68345539d40eeb7de?lk3s=7b078dd2&x-expires=1793793600&x-signature=H5…"},{"cid":"7701645404039267130","text":"“今天狗粮广告啊”\n“不是啊我挪个车去”\n谁懂我的笑点[捂脸][捂脸][捂脸]","created_at":"2026-10-28T09:17:38.000Z","likes":5185,"reply_count":8,"ip_location":"安徽","user":{"uid":"83530805579","sec_uid":"MS4wLjABAAAAM9XhDgHoLPsc-C7s_96ipLt9MaPG_NPiMgOdxJWELds","unique_id":"wuyouxiaoye","nickname":"mx叶","avatar":"https://p3-pc.douyinpic.com/aweme/100x100/aweme-avatar/tos-cn-i-0813c001_3f0f70f8fdc34567be12b2766629b74c.jpeg?from=2064092626","verified":null,"url":"https://www.douyin.com/user/MS4wLjABAAAAM9XhDgHoLPsc-C7s_96ipLt9MaPG_NPiMgOdxJWELds"},"reply_to_cid":null,"reply_to_user":null,"images":[],"sticker":null},"… 18 more"],"cached":false,"credits_used":1}},"text/csv":{"schema":{"type":"string"}},"application/x-ndjson":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"404":{"$ref":"#/components/responses/E404"},"502":{"$ref":"#/components/responses/E502"},"503":{"$ref":"#/components/responses/E503"}}}}},"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"Create keys at https://app.api.sh/keys. Authorization: Bearer <key> also works."}},"parameters":{"raw":{"name":"raw","in":"query","required":false,"description":"0 leaves out the bulky `raw` source blocks (often 10-30x smaller).","schema":{"type":"string","enum":["0","1"]}},"fields":{"name":"fields","in":"query","required":false,"description":"Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included.","schema":{"type":"string"}},"fresh":{"name":"fresh","in":"query","required":false,"description":"1 skips the 24-hour cache and fetches live.","schema":{"type":"string","enum":["1"]}},"output":{"name":"output","in":"query","required":false,"description":"csv or ndjson returns the response's records (its main list, or the object as one row) as CSV or NDJSON instead of JSON.","schema":{"type":"string","enum":["json","csv","ndjson"]}},"records":{"name":"records","in":"query","required":false,"description":"With output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row.","schema":{"type":"string"}}},"schemas":{"Error":{"type":"object","properties":{"success":{"type":"boolean","const":false},"error":{"type":"string"}},"required":["success","error"]}},"responses":{"E400":{"description":"A parameter is missing or invalid. Not charged (unless the call ran and the source rejected the value; credits_used says).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E401":{"description":"Missing, invalid, revoked or expired API key. Not charged. See https://api.sh/docs/errors#401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E402":{"description":"Not enough credits, a spend limit you set was reached (`spend_limit`), or the key's monthly credit cap was reached (`key_cap`). Not charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E404":{"description":"Not found, or not public. A lookup that ran costs the endpoint's price (credits_used says); an unknown route is free.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E502":{"description":"The source site failed this time; retry. Not charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E503":{"description":"Endpoint paused or temporarily unavailable; may include retry-after. Not charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"headers":{"x-request-id":{"description":"The call's id (logs, re-fetch with /v1/results/{id}).","schema":{"type":"string","format":"uuid"}},"x-credits-used":{"description":"Credits charged for this call.","schema":{"type":"integer"}},"x-credits-remaining":{"description":"Balance after the call.","schema":{"type":"integer"}}}},"externalDocs":{"url":"https://api.sh/docs"}}