• 最新接口有关抖音,获取抖音分享口令url API


    前往测试最新API接口:item_password

    一、公共参数

    请求地址: https://api-gw.onebound.cn/douyin/item_password

    名称类型必须描述
    keyString调用key(必须以GET方式拼接在URL中)
    secretString调用密钥
    api_nameStringAPI接口名称(包括在请求地址中)[item_search,item_get,item_search_shop等]
    cacheString[yes,no]默认yes,将调用缓存的数据,速度比较快
    result_typeString[json,jsonu,xml,serialize,var_export]返回数据格式,默认为json,jsonu输出的内容中文可以直接阅读
    langString[cn,en,ru]翻译语言,默认cn简体中文
    versionStringAPI版本

    二、请求参数

    请求参数:word=https://v.douyin.com/FC9YN33/

    参数说明:word:短口令

    三、响应参数

    Version: Date:

    名称类型必须示例值描述

    item

    item[]0视频详情数据

    num_iid

    String07092264344980868359视频ID

    title

    String0修以美好,与君相遇#就算无人欣赏也要独自芬芳视频标题

    nick

    String0花草日记 🪴 麦麦昵称

    detail_url

    String0https://www.iesdouyin.com/share/video/7092264344980868359/?region=&mid=7090863251021515533&u_code=0&did=MS4wLjABAAAANwkJuWIRFOzg5uCpDRpMj4OX-QryoDgn-yYlXQnRwQQ&iid=MS4wLjABAAAANwkJuWIRFOzg5uCpDRpMj4OX-QryoDgn-yYlXQnRwQQ&with_sec_did=1&titleType=title链接

    signature

    String0🐌不谈悲喜、只闻花香\n\n🐌手机随拍、装点生活签名

    item_imgs

    Mix0item_imgs[]图片

    video

    Mix0[]

    music

    Mix0[]

    四、请求示例

    1. //using System.Net.Security;
    2. //using System.Security.Cryptography.X509Certificates;
    3. private const String method = "GET";
    4. static void Main(string[] args)
    5. {
    6. String bodys = "";
    7. // 请求示例 url 默认请求参数已经做URL编码
    8. String url = "https://api-gw.onebound.cn/douyin/item_password/?key=<您自己的apiKey>&secret=<您自己的apiSecret>&word=https://v.douyin.com/FC9YN33/";
    9. HttpWebRequest httpRequest = null;
    10. HttpWebResponse httpResponse = null;
    11. if (url.Contains("https://"))
    12. {
    13. ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);
    14. httpRequest = (HttpWebRequest)WebRequest.CreateDefault(new Uri(url));
    15. }
    16. else
    17. {
    18. httpRequest = (HttpWebRequest)WebRequest.Create(url);
    19. }
    20. httpRequest.Method = method;
    21. if (0 < bodys.Length)
    22. {
    23. byte[] data = Encoding.UTF8.GetBytes(bodys);
    24. using (Stream stream = httpRequest.GetRequestStream())
    25. {
    26. stream.Write(data, 0, data.Length);
    27. }
    28. }
    29. try
    30. {
    31. httpResponse = (HttpWebResponse)httpRequest.GetResponse();
    32. }
    33. catch (WebException ex)
    34. {
    35. httpResponse = (HttpWebResponse)ex.Response;
    36. }
    37. Console.WriteLine(httpResponse.StatusCode);
    38. Console.WriteLine(httpResponse.Method);
    39. Console.WriteLine(httpResponse.Headers);
    40. Stream st = httpResponse.GetResponseStream();
    41. StreamReader reader = new StreamReader(st, Encoding.GetEncoding("utf-8"));
    42. Console.WriteLine(reader.ReadToEnd());
    43. Console.WriteLine("\n");
    44. }
    45. public static bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
    46. {
    47. return true;
    48. }

    五、响应示例

    1. {
    2. item: {
    3. item: {
    4. num_iid: "7092264344980868359",
    5. detail_url: "https://www.iesdouyin.com/share/video/7092264344980868359/?region=&mid=7090863251021515533&u_code=0&did=MS4wLjABAAAANwkJuWIRFOzg5uCpDRpMj4OX-QryoDgn-yYlXQnRwQQ&iid=MS4wLjABAAAANwkJuWIRFOzg5uCpDRpMj4OX-QryoDgn-yYlXQnRwQQ&with_sec_did=1&titleType=title",
    6. title: "修以美好,与君相遇#就算无人欣赏也要独自芬芳",
    7. type: "video",
    8. nick: "花草日记 🪴 麦麦",
    9. signature: "🐌不谈悲喜、只闻花香 🐌手机随拍、装点生活",
    10. uid: "5698411035",
    11. short_id: "969898359",
    12. video: {
    13. url: "https://aweme.snssdk.com/aweme/v1/playwm/?video_id=v0200fg10000c9mcherc77ufa73socn0&ratio=720p&line=0",
    14. url_raw: "https://aweme.snssdk.com/aweme/v1/play/?video_id=v0200fg10000c9mcherc77ufa73socn0&ratio=720p&line=0",
    15. pic_url: "https://p6-sign.douyinpic.com/tos-cn-p-0015/871cb3034d9b4073bd2aa8960bff93fd~c5_300x400.jpeg?x-expires=1657267200&x-signature=B51pWtm1i1Mljef8gNaulIXDdgk%3D&from=4257465056_large&s=PackSourceEnum_DOUYIN_REFLOW&se=false&sc=cover&l=202206241655240102080381023402F3ED"
    16. },
    17. music: {
    18. title: "@若然若创作的原声一若然若",
    19. nick: "若然若",
    20. url: "https://sf6-cdn-tos.douyinstatic.com/obj/ies-music/7090863247943109407.mp3",
    21. pic_url: "https://p6.douyinpic.com/aweme/1080x1080/aweme-avatar/tos-cn-avt-0015_1e7c8177679e3c9b4743da4968714762.jpeg?from=116350172"
    22. },
    23. item_imgs: null
    24. },
    25. data_from: "app"
    26. },
    27. error: "",
    28. reason: "",
    29. error_code: "0000",
    30. cache: 0,
    31. api_info: "today:- max:101000 all[=++];expires:2030-12-31",
    32. execution_time: "2.333",
    33. server_time: "Beijing/2022-06-24 16:55:39",
    34. client_ip: "127.0.0.1",
    35. call_args: [ ],
    36. api_type: "douyin",
    37. server_memory: "3MB",
    38. last_id: false
    39. }

    六、异常示例

    1. {
    2. "error": "item-not-found",
    3. "reason": "没找到",
    4. "error_code": "2000",
    5. "success": 0,
    6. "cache": 0,
    7. "api_info": "today:0 max:10000",
    8. "execution_time": 0.081,
    9. "server_time": "Beijing/2020-06-10 23:44:00",
    10. "call_args": [],
    11. "api_type": "douyin",
    12. "request_id": "1ee0ffc041242"}

    七、错误码解释

    状态代码(error_code)状态信息详细描述是否收费
    0000success接口调用成功并返回相关数据
    2000Search success but no result接口访问成功,但是搜索没有结果
    4000Server internal error服务器内部错误
    4001Network error网络错误
    4002Target server error目标服务器错误
    4003Param error用户输入参数错误忽略
    4004Account not found用户帐号不存在忽略
    4005Invalid authentication credentials授权失败忽略
    4006API stopped您的当前API已停用忽略
    4007Account stopped您的账户已停用忽略
    4008API rate limit exceeded并发已达上限忽略
    4009API maintenanceAPI维护中忽略
    4010API not found with these valuesAPI不存在忽略
    4012Please add api first请先添加api忽略
    4013Number of calls exceeded调用次数超限忽略
    4014Missing url param参数缺失忽略
    4015Wrong pageToken参数pageToken有误忽略
    4016Insufficient balance余额不足忽略
    4017timeout error请求超时
    5000unknown error未知错误
  • 相关阅读:
    数学建模学习笔记(8):图论最短路径问题
    c#如何判断一个类型是否为数值类型,请给出通用方法
    JAVAWeb---- 数据库的简单了解
    学习JAVA的第十二天(基础)
    获取鼠标在画布中的位置
    Java8新特性stream和parallelStream有什么区别
    Spring整合RabbitMQ
    ES6 入门教程 10 对象的扩展 10.4 属性的可枚举性和遍历 & 10.5 super 关键字
    创建工作生活新范式 开拓经济增长新空间
    springboot运行jar包,实现复制jar包resources下文件、文件夹(可支持包含子文件夹)到指定的目录
  • 原文地址:https://blog.csdn.net/Noah_ZX/article/details/126177941