Media ID转Shortcode
curl --request GET \
--url https://api.keyapi.ai/v1/instagram/media_id_to_shortcode \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.keyapi.ai/v1/instagram/media_id_to_shortcode"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.keyapi.ai/v1/instagram/media_id_to_shortcode', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://api.keyapi.ai/v1/instagram/media_id_to_shortcode")
.header("Authorization", "Bearer <token>")
.asString();{
"code": 0,
"message": "success",
"data": {
"status": true,
"media_id": "3774507992167247878",
"shortcode": "DRhvwVLAHAG"
},
"requestId": "62bcba45-95f5-4c18-a87c-d2428a2cb585"
}{
"code": 400,
"data": null,
"message": "Missing required parameter: handle"
}{
"code": 401,
"data": null,
"message": "apiKey is null"
}{
"code": 402,
"data": null,
"message": "apiKey quota is not enough"
}{
"code": 429,
"data": null,
"message": "qps limit exceeded"
}{
"code": 500,
"data": null,
"message": "Internal server error"
}Instagram 用户
Media ID转Shortcode
将Instagram帖子的Media ID转换为Shortcode
Shortcode可用于构建帖子URL:https://instagram.com/p/{shortcode}/
GET
/
v1
/
instagram
/
media_id_to_shortcode
Media ID转Shortcode
curl --request GET \
--url https://api.keyapi.ai/v1/instagram/media_id_to_shortcode \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.keyapi.ai/v1/instagram/media_id_to_shortcode"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.keyapi.ai/v1/instagram/media_id_to_shortcode', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://api.keyapi.ai/v1/instagram/media_id_to_shortcode")
.header("Authorization", "Bearer <token>")
.asString();{
"code": 0,
"message": "success",
"data": {
"status": true,
"media_id": "3774507992167247878",
"shortcode": "DRhvwVLAHAG"
},
"requestId": "62bcba45-95f5-4c18-a87c-d2428a2cb585"
}{
"code": 400,
"data": null,
"message": "Missing required parameter: handle"
}{
"code": 401,
"data": null,
"message": "apiKey is null"
}{
"code": 402,
"data": null,
"message": "apiKey quota is not enough"
}{
"code": 429,
"data": null,
"message": "qps limit exceeded"
}{
"code": 500,
"data": null,
"message": "Internal server error"
}🪙2 credits每次请求
复制给 AI
🤖 为什么还要自己写代码?
让 AI 来处理重复工作。点击按钮即可复制一段整理好的提示词,用于 ChatGPT、Claude 或你常用的 AI 助手。
授权
接口鉴权凭证。请在请求 Header 中传入 Authorization: Bearer <YOUR_API_KEY>。
可在 Dashboard 获取你的 API Key。
响应
请求成功
The response is of type object.

