Tài liệu API

Để biết giá API hãy nhấp vào đây

API InStag.com được lưu trữ tại instag.com .


Xác thực

Để truy cập API InStag.com, bạn phải bao gồm khóa API duy nhất của mình. Bạn có thể lấy khóa API bằng cách đăng ký bằng địa chỉ email của mình. Hãy nhớ giữ bí mật khóa API của bạn.

Xác thực bằng API được xử lý thông qua tiêu đề HTTP. Tất cả các yêu cầu đều yêu cầu tiêu đề Ủy quyền có chứa khóa API của bạn theo định dạng khóa: YOUR_API_KEY , trong đó YOUR_API_KEY là khóa có sẵn trên trang tài khoản của bạn.

Vì lý do bảo mật, mọi yêu cầu phải được gửi qua kết nối HTTPS được mã hóa để bảo vệ dữ liệu của bạn trong quá trình truyền tải.


Tải xuống bất kỳ url thư viện hình ảnh nào

Tải xuống bất kỳ url thư viện hình ảnh nào bằng api của chúng tôi bao gồm video Instagram, reels, ảnh, IGTV và vòng quay

Ví dụ:

Thay thế YOUR_API_KEY bằng khóa API duy nhất của bạn (có trên trang tài khoản InStag.com của bạn) và thay thế "URL" bằng URL tài nguyên:

import requests
import base64

headers = {"Authorization": "API_KEY"}
r = requests.post(
    url="https://instag.com/api/v1/submit/",
    headers=headers,
    data={
        "url": url
    }
)

if r.status_code == 200:
    print(r.json())
else:
    print(r.status_code)
    print(r.text)
const axios = require('axios');

const headers = {
  Authorization: "API_KEY"
};

const data = {
  url: url
};

axios
  .post("https://instag.com/api/v1/submit/", data, { headers })
  .then(response => {
    const fs = require('fs');
    const fileStream = fs.createWriteStream("audio.mp3");

    response.data.pipe(fileStream);

    fileStream.on('finish', () => {
      console.log("Archivo descargado con éxito como audio.mp3");
    });

    fileStream.on('error', error => {
      console.error("Error al escribir el archivo:", error);
    });
  })
  .catch(error => {
    console.error("Error en la solicitud:", error);
  });
<?php

// Datos para enviar en la solicitud POST
$data = [
    "urk" => "url"
];

// Convertir los datos a formato URL-encoded
$postData = http_build_query($data);

// Configurar la solicitud cURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://instag.com/api/v1/submit/");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Authorization: API_KEY",
    "Content-Type: application/x-www-form-urlencoded"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// Ejecutar la solicitud
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($httpCode === 200) {
    // Guardar el archivo de audio
    $file = fopen("audio.mp3", "wb");
    fwrite($file, $response);
    fclose($file);
    echo "Archivo descargado con éxito como audio.mp3";
} else {
    echo "Error en la solicitud. Código HTTP: $httpCode";
}
?>
curl -L -X POST "https://instag.com/api/v1/submit/" \
    -H "Authorization: API_KEY" \
    -H "Content-Type: application/x-www-form-urlencoded" \
    --data-urlencode "url=AUDIO_URL" \
    --output "audio.mp3" --silent --show-error --write-out "\nHTTP_STATUS=%{http_code}"

API Chính sách bảo mật Điều khoản dịch vụ Liên hệ với chúng tôi BlueSky Theo dõi chúng tôi trên BlueSky

2025 InStag LLC | Được thực hiện bởi nadermx