import{_ as n,c as a,a as t,o as l}from"./app-Dgsdh8A6.js";const e={};function o(p,s){return l(),a("div",null,s[0]||(s[0]=[t(`<h1 id="批量查询" tabindex="-1"><a class="header-anchor" href="#批量查询"><span>批量查询</span></a></h1><h2 id="用户名查-mid" tabindex="-1"><a class="header-anchor" href="#用户名查-mid"><span>用户名查 mid</span></a></h2><h3 id="动态" tabindex="-1"><a class="header-anchor" href="#动态"><span>动态</span></a></h3><blockquote><p>https://api.bilibili.com/x/polymer/web-dynamic/v1/name-to-uid</p></blockquote><p><em>请求方法: GET</em></p><p>认证方式: Cookie (SESSDATA)</p><p><strong>URL 参数:</strong></p><table><thead><tr><th>参数名</th><th>类型</th><th>内容</th><th>必要性</th><th>备注</th></tr></thead><tbody><tr><td>names</td><td>string</td><td>用户名</td><td>必要</td><td>多个用户名以 <code>,</code> 分隔</td></tr></tbody></table><p><strong>JSON 回复:</strong></p><p>根对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>code</td><td>number</td><td>返回值</td><td>0: 成功<br>-101: 账号未登录<br>-400: 请求错误</td></tr><tr><td>data</td><td>object</td><td>数据本体</td><td></td></tr><tr><td>message</td><td>string</td><td>错误信息</td><td>成功时为 <code>0</code></td></tr><tr><td>ttl</td><td>number</td><td><code>1</code></td><td></td></tr></tbody></table><p><code>data</code> 对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>uid_list</td><td>object[]</td><td>UID 列表</td><td>套了个娃</td></tr></tbody></table><p><code>data.uid_list[]</code> 对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>name</td><td>string</td><td>用户名</td><td></td></tr><tr><td>uid</td><td>string</td><td>mid (UID)</td><td></td></tr></tbody></table><p><strong>示例:</strong></p><div class="language-shell line-numbers-mode" data-highlighter="shiki" data-ext="shell" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-shell"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#569CD6;"> -G</span><span style="color:#CE9178;"> &#39;https://api.bilibili.com/x/polymer/web-dynamic/v1/name-to-uid&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">--url-query </span><span style="color:#CE9178;">&#39;names=社会易姐qwq,session小胡,陈睿,洛天依&#39;</span><span style="color:#D7BA7D;"> \\</span></span>
<span class="line"><span style="color:#D4D4D4;">-b </span><span style="color:#CE9178;">&#39;SESSDATA=xxx&#39;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><details><summary>查看响应示例:</summary><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;code&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;data&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;uid_list&quot;</span><span style="color:#D4D4D4;">: [</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;社会易姐QwQ&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;uid&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;293793435&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;陈睿&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;uid&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;208259&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;Session小胡&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;uid&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;645769214&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      },</span></span>
<span class="line"><span style="color:#D4D4D4;">      {</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;name&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;洛天依&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;uid&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;36081646&quot;</span></span>
<span class="line"><span style="color:#D4D4D4;">      }</span></span>
<span class="line"><span style="color:#D4D4D4;">    ]</span></span>
<span class="line"><span style="color:#D4D4D4;">  },</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;message&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;0&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;ttl&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details>`,18)]))}const i=n(e,[["render",o]]),r=JSON.parse('{"path":"/docs/user/batch.html","title":"批量查询","lang":"zh-CN","frontmatter":{},"git":{"updatedTime":1752997711000,"contributors":[{"name":"SessionHu","username":"SessionHu","email":"102411014+SessionHu@users.noreply.github.com","commits":1,"url":"https://github.com/SessionHu"}],"changelog":[{"hash":"69afaf047d317824f00b99aa770e49daada79851","time":1752997711000,"email":"102411014+SessionHu@users.noreply.github.com","author":"SessionHu","message":"feat: add username to mid"}]},"filePathRelative":"docs/user/batch.md"}');export{i as comp,r as data};
