API Documentation

Learn how to integrate Native IG's video download functionality into your applications

Video Download Endpoint

GET

Retrieve video information and download URL from an Instagram post

GET https://nativeig.vercel.app/api/video?postUrl=INSTAGRAM_POST_URL

Request Parameters

Required query parameters for the API

ParameterTypeDescription
postUrlstringThe URL of the Instagram Reel to download (e.g., https://www.instagram.com/reels/xyz123/)

Response Examples

Example responses from the API

{
  "status": "success",
  "data": {
    "filename": "native-ig-1734345296.mp4",
    "width": "640",
    "height": "1136",
    "videoUrl": "https://scontent-iad3-2.cdninstagram.com/..."
  }
}

Code Examples

Example code snippets for API integration in different languages

// Using Fetch API
const getVideoInfo = async (postUrl) => {
  try {
    const response = await fetch(`https://nativeig.vercel.app/api/video?postUrl=${encodeURIComponent(postUrl)}`);
    const data = await response.json();
    
    if (data.status === 'error') {
      throw new Error(data.message);
    }
    
    return data.data;
  } catch (error) {
    console.error('Error fetching video:', error);
    throw error;
  }
};

// Usage
const videoInfo = await getVideoInfo('https://www.instagram.com/reel/xyz123/');
console.log(videoInfo);

Important Notes

Things to keep in mind when using the API

  • Only Instagram Reels are supported (URLs starting with instagram.com/reels/)
  • Ensure the Instagram Reel URL is publicly accessible
  • The API returns direct video URLs that are valid for a limited time
  • Rate limiting may apply to prevent abuse
  • Video quality is the highest available from the source
  • For support or questions, please visit our GitHub repository