{"openapi":"3.1.0","info":{"title":"LamaTok REST","description":"`RESTful API Service for TT`","termsOfService":"https://lamatok.com/help/terms-of-service","license":{"name":"Pricing","url":"https://lamatok.com/pricing"},"version":"1.3.3"},"paths":{"/v1/user/by/username":{"get":{"tags":["v1/user"],"summary":"Userinfo By Username","operationId":"userinfo_by_username_v1_user_by_username_get","parameters":[{"name":"username","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":24,"title":"Username"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/user/following/by/secUid":{"get":{"tags":["v1/user"],"summary":"Following By Sec Uid","operationId":"following_by_sec_uid_v1_user_following_by_secUid_get","parameters":[{"name":"secUid","in":"query","required":true,"schema":{"type":"string","minLength":55,"maxLength":76,"pattern":"^[a-zA-Z0-9_/-]+$","title":"Secuid"}},{"name":"page_id","in":"query","required":false,"schema":{"type":"string","description":"Use value of field `next_page_id` from response for getting next page","title":"Page Id"},"description":"Use value of field `next_page_id` from response for getting next page"},{"name":"count","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Count"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/user/followers/by/secUid":{"get":{"tags":["v1/user"],"summary":"Followers By Sec Uid","operationId":"followers_by_sec_uid_v1_user_followers_by_secUid_get","parameters":[{"name":"secUid","in":"query","required":true,"schema":{"type":"string","minLength":55,"maxLength":76,"pattern":"^[a-zA-Z0-9_/-]+$","title":"Secuid"}},{"name":"page_id","in":"query","required":false,"schema":{"type":"string","description":"Use value of field `next_page_id` from response for getting next page","title":"Page Id"},"description":"Use value of field `next_page_id` from response for getting next page"},{"name":"count","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Count"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/user/suggested/by/secUid":{"get":{"tags":["v1/user"],"summary":"Suggested By Sec Uid","operationId":"suggested_by_sec_uid_v1_user_suggested_by_secUid_get","parameters":[{"name":"secUid","in":"query","required":true,"schema":{"type":"string","minLength":55,"maxLength":76,"pattern":"^[a-zA-Z0-9_/-]+$","title":"Secuid"}},{"name":"page_id","in":"query","required":false,"schema":{"type":"string","description":"Use value of field `next_page_id` from response for getting next page","title":"Page Id"},"description":"Use value of field `next_page_id` from response for getting next page"},{"name":"count","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Count"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/user/following/by/username":{"get":{"tags":["v1/user"],"summary":"Following By Username","operationId":"following_by_username_v1_user_following_by_username_get","parameters":[{"name":"username","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":24,"title":"Username"}},{"name":"page_id","in":"query","required":false,"schema":{"type":"string","description":"Use value of field `next_page_id` from response for getting next page","title":"Page Id"},"description":"Use value of field `next_page_id` from response for getting next page"},{"name":"count","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Count"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/user/followers/by/username":{"get":{"tags":["v1/user"],"summary":"Followers By Username","operationId":"followers_by_username_v1_user_followers_by_username_get","parameters":[{"name":"username","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":24,"title":"Username"}},{"name":"page_id","in":"query","required":false,"schema":{"type":"string","description":"Use value of field `next_page_id` from response for getting next page","title":"Page Id"},"description":"Use value of field `next_page_id` from response for getting next page"},{"name":"count","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Count"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/user/suggested/by/username":{"get":{"tags":["v1/user"],"summary":"Suggested By Username","operationId":"suggested_by_username_v1_user_suggested_by_username_get","parameters":[{"name":"username","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":24,"title":"Username"}},{"name":"page_id","in":"query","required":false,"schema":{"type":"string","description":"Use value of field `next_page_id` from response for getting next page","title":"Page Id"},"description":"Use value of field `next_page_id` from response for getting next page"},{"name":"count","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Count"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/user/playlists/by/username":{"get":{"tags":["v1/user"],"summary":"Playlists By Username","operationId":"playlists_by_username_v1_user_playlists_by_username_get","parameters":[{"name":"username","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":24,"title":"Username"}},{"name":"page_id","in":"query","required":false,"schema":{"type":"string","description":"Use value of field `next_page_id` from response for getting next page","title":"Page Id"},"description":"Use value of field `next_page_id` from response for getting next page"},{"name":"count","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Count"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/user/playlists/by/secUid":{"get":{"tags":["v1/user"],"summary":"Playlists By Sec Uid","operationId":"playlists_by_sec_uid_v1_user_playlists_by_secUid_get","parameters":[{"name":"secUid","in":"query","required":true,"schema":{"type":"string","minLength":55,"maxLength":76,"pattern":"^[a-zA-Z0-9_/-]+$","title":"Secuid"}},{"name":"page_id","in":"query","required":false,"schema":{"type":"string","description":"Use value of field `next_page_id` from response for getting next page","title":"Page Id"},"description":"Use value of field `next_page_id` from response for getting next page"},{"name":"count","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Count"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/media/by/id":{"get":{"tags":["v1/media"],"summary":"Media By Id","operationId":"media_by_id_v1_media_by_id_get","parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{19}$","title":"Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/media/comments/by/id":{"get":{"tags":["v1/media"],"summary":"Media Comments By Id","operationId":"media_comments_by_id_v1_media_comments_by_id_get","parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{19}$","title":"Id"}},{"name":"count","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Count"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/media/comment/replies/by/id":{"get":{"tags":["v1/media"],"summary":"Media Comment Replies By Id","operationId":"media_comment_replies_by_id_v1_media_comment_replies_by_id_get","parameters":[{"name":"media_id","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{19}$","title":"Media Id"}},{"name":"comment_id","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{19}$","title":"Comment Id"}},{"name":"count","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Count"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/media/by/url":{"get":{"tags":["v1/media"],"summary":"Media By Url","operationId":"media_by_url_v1_media_by_url_get","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","description":"examples: 'https://www.tiktok.com/@username/video/1023456772335574271' or '/@username/video/1023456772335574271'or 'https://vt.tiktok.com/ABCDEfghK/'","title":"Url"},"description":"examples: 'https://www.tiktok.com/@username/video/1023456772335574271' or '/@username/video/1023456772335574271'or 'https://vt.tiktok.com/ABCDEfghK/'"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/media/video/download/by/id":{"get":{"tags":["v1/media"],"summary":"Download Media By Id","description":"Get download link and headers by media url. Use the headers and url taken from the response. You can see an example in the [redoc documentation.](https://api.lamatok.com/redoc#tag/v1media/operation/download_media_by_id_v1_media_video_download_by_id_get)","operationId":"download_media_by_id_v1_media_video_download_by_id_get","parameters":[{"name":"watermark","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Watermark"}},{"name":"id","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{19}$","description":"examples: '7329151448644734213'","title":"Id"},"description":"examples: '7329151448644734213'"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Python","source":"import requests\n\nres = requests.get(download_url, headers=headers)\nFILE_OUTPUT = 'output.mp4'\nwith open(FILE_OUTPUT, \"wb\") as out_file:\n    out_file.write(res.content)\n","label":"Python"}],"required":false}},"/v1/media/video/download/by/url":{"get":{"tags":["v1/media"],"summary":"Download Media By Url","description":"Get download link and headers by media url. Use the headers and url taken from the response. You can see an example in the [redoc documentation.](https://api.lamatok.com/redoc#tag/v1media/operation/download_media_by_url_v1_media_video_download_by_url_get)","operationId":"download_media_by_url_v1_media_video_download_by_url_get","parameters":[{"name":"watermark","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Watermark"}},{"name":"url","in":"query","required":true,"schema":{"type":"string","description":"examples: 'https://www.tiktok.com/@username/video/7329151448644734213' or '/@username/video/7329151448644734213'or 'https://vt.tiktok.com/ABCDEfghK/'","title":"Url"},"description":"examples: 'https://www.tiktok.com/@username/video/7329151448644734213' or '/@username/video/7329151448644734213'or 'https://vt.tiktok.com/ABCDEfghK/'"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Python","source":"import requests\n\nres = requests.get(download_url, headers=headers)\nFILE_OUTPUT = 'output.mp4'\nwith open(FILE_OUTPUT, \"wb\") as out_file:\n    out_file.write(res.content)\n","label":"Python"}],"required":false}},"/v1/media/music/download/by/id":{"get":{"tags":["v1/media"],"summary":"Download Music By Id","description":"Get download link and headers by media url. Use the headers and url taken from the response. You can see an example in the [redoc documentation.](https://api.lamatok.com/redoc#tag/v1media/operation/download_music_by_id_v1_media_music_download_by_id_get)","operationId":"download_music_by_id_v1_media_music_download_by_id_get","parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{19}$","description":"examples: '7329151448644734213'","title":"Id"},"description":"examples: '7329151448644734213'"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Python","source":"import requests\n\nres = requests.get(download_url, headers=headers)\nFILE_OUTPUT = 'output.mp3'\nwith open(FILE_OUTPUT, \"wb\") as out_file:\n    out_file.write(res.content)\n","label":"Python"}],"required":false}},"/v1/media/music/download/by/url":{"get":{"tags":["v1/media"],"summary":"Download Audio By Url","description":"Get download link and headers by media url. Use the headers and url taken from the response. You can see an example in the [redoc documentation.](https://api.lamatok.com/redoc#tag/v1media/operation/download_audio_by_url_v1_media_music_download_by_url_get)","operationId":"download_audio_by_url_v1_media_music_download_by_url_get","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","description":"examples: 'https://www.tiktok.com/@username/video/7329151448644734213' or '/@username/video/7329151448644734213'or 'https://vt.tiktok.com/ABCDEfghK/'","title":"Url"},"description":"examples: 'https://www.tiktok.com/@username/video/7329151448644734213' or '/@username/video/7329151448644734213'or 'https://vt.tiktok.com/ABCDEfghK/'"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-codeSamples":[{"lang":"Python","source":"import requests\n\nres = requests.get(download_url, headers=headers)\nFILE_OUTPUT = 'output.mp3'\nwith open(FILE_OUTPUT, \"wb\") as out_file:\n    out_file.write(res.content)\n","label":"Python"}],"required":false}},"/v1/hashtag/info":{"get":{"tags":["v1/hashtag"],"summary":"Hashtag Info","operationId":"hashtag_info_v1_hashtag_info_get","parameters":[{"name":"hashtag","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":50,"title":"Hashtag"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/hashtag/medias":{"get":{"tags":["v1/hashtag"],"summary":"Hashtag Medias","operationId":"hashtag_medias_v1_hashtag_medias_get","parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"integer","title":"Id"}},{"name":"count","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"default":30,"title":"Count"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sys/balance":{"get":{"tags":["/sys"],"summary":"Balance","operationId":"balance_sys_balance_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Balance Sys Balance Get"}}}},"404":{"description":"Not found"}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"externalDocs":{"description":"Get the access_key","url":"https://lamatok.com/tokens"},"servers":[{"url":"https://api.lamatok.com","description":"Lamatok API"}]}