FastSocial Instagram Data
Dữ liệu Instagram công khai chỉ đọc cho trợ lý AI: hồ sơ, bài đăng, reel, số người theo dõi, mức độ tương tác và bảng xếp hạng hàng ngày. Đăng nhập OAuth, không cần dán khóa.
Tài liệu
Get one Instagram post or reel
GET /v1/post
Likes, comments, views, caption, owner and media URLs for a single post, reel or IGTV video.
Costs 1 credit per call.
| Parameter | Description |
|---|---|
url | Post, reel or IGTV URL. Pass this or shortcode. |
shortcode | The code in the post URL (instagram.com/p/<code>/). |
Request
curl "https://data.fastsocial.co/v1/post?url=https://www.instagram.com/reel/DdhFkS7KGkZ/" \
-H "X-API-Key: $FASTSOCIAL_API_KEY"
import os
import requests
r = requests.get(
"https://data.fastsocial.co/v1/post",
params={"url": "https://www.instagram.com/reel/DdhFkS7KGkZ/"},
headers={"X-API-Key": os.environ["FASTSOCIAL_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])
const url = new URL("https://data.fastsocial.co/v1/post");
url.search = new URLSearchParams({ url: "https://www.instagram.com/reel/DdhFkS7KGkZ/" });
const res = await fetch(url, { headers: { "X-API-Key": API_KEY } });
const body = await res.json();
if (!body.ok) throw new Error(body.error.code);
console.log(body.data);
// Call from your server or a worker, never from a public web page: the key must stay secret.
// Node 18+ (built-in fetch). Run as an ES module: node app.mjs
const url = new URL("https://data.fastsocial.co/v1/post");
url.search = new URLSearchParams({ url: "https://www.instagram.com/reel/DdhFkS7KGkZ/" });
const res = await fetch(url, { headers: { "X-API-Key": process.env.FASTSOCIAL_API_KEY } });
const { ok, data, error } = await res.json();
if (!ok) throw new Error(error.code);
console.log(data);
<?php
$url = "https://data.fastsocial.co/v1/post?" . http_build_query(['url' => "https://www.instagram.com/reel/DdhFkS7KGkZ/"]);
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-API-Key: " . getenv("FASTSOCIAL_API_KEY")],
CURLOPT_TIMEOUT => 30,
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($body["data"]);
package main
import (
"fmt"
"io"
"net/http"
"net/url"
"os"
)
func main() {
q := url.Values{}
q.Set("url", "https://www.instagram.com/reel/DdhFkS7KGkZ/")
req, _ := http.NewRequest("GET", "https://data.fastsocial.co/v1/post?"+q.Encode(), nil)
req.Header.Set("X-API-Key", os.Getenv("FASTSOCIAL_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
require "net/http"
require "json"
uri = URI("https://data.fastsocial.co/v1/post")
uri.query = URI.encode_www_form({"url" => "https://www.instagram.com/reel/DdhFkS7KGkZ/"})
req = Net::HTTP::Get.new(uri)
req["X-API-Key"] = ENV["FASTSOCIAL_API_KEY"]
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(res.body)["data"]
Response
200 OK
{
"ok": true,
"data": {
"shortcode": "C8x1abcDEF0",
"url": "https://www.instagram.com/p/C8x1abcDEF0/",
"taken_at": 1758600000,
"format": "reel",
"likes": 412000,
"comments": 1900,
"views": 5400000,
"caption": "Sunrise over the Pacific, seen from the station.",
"image_url": "https://scontent.cdninstagram.com/…/1080.jpg",
"video_url": "https://scontent.cdninstagram.com/…/clip.mp4",
"pinned": false,
"owner_username": "nasa",
"owner_id": "528817151"
},
"meta": {
"cache": "hit",
"age_seconds": 212,
"stale": false,
"credits": 1,
"credits_remaining": 4812
}
}