Skip to content

About

Instagram Scraper API for Node.js and TypeScript — official SDK, profiles, media, reels, comments and search

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

Repository files navigation

Instagram Scraper API for Node.js & TypeScript

Latest release Node.js requirements Last commit MIT license

Run in Postman

A small, configurable client with named methods and ready-to-run examples. Supports 97 Instagram Scraper API methods.

Package: @jsonscraper/instagram · Methods · Examples · Documentation

Quick start: API key, setup, first request, JSON response MCP is live: connect Instagram and TikTok data to ChatGPT, Claude or Codex with your existing API key. Connect via MCP.

Quick start

1. Get your key from the Instagram API product page and set it on your server:

export JSONSCRAPER_INSTAGRAM_LICENSE_KEY='your-license-key'

2. Install the package:

npm install github:jsonscraper/instagram-api-node#0.1.2

3. Make a request:

import {Instagram, APIError} from '@jsonscraper/instagram';

const client = new Instagram(process.env.JSONSCRAPER_INSTAGRAM_LICENSE_KEY, {timeout: 30000, retries: 1});
try {
  const response = await client.v1_user_by_username({username: 'apple', cache_timeout: 60});
  if (response.status !== 'ok') throw new Error('The API returned an application error');
  console.log(response.ig);
} catch (error) {
  if (error instanceof APIError) console.error('HTTP', error.status);
  else throw error;
}

The API payload is in ig. Live calls require a valid API license and may consume quota. Response examples and status handling.

Main methods

97 methods are available. Common starting points:

What you need Method
Read a profile v1_user_by_username()
Read a profile by ID v1_user_by_id()
List profile posts v1_user_medias_chunk()
Read a post or reel v1_media_by_code()
Read comments v1_media_comments_chunk()
Search profiles v1_search_users()

All methods and parameters →

Ready-to-run examples

Each example includes command-line parameters, key setup, timeouts, error handling and response output. Run it with --help first; this makes no API request.

Browse all 97 complete examples · Full method and parameter reference

Configuration

Requests use a 30-second timeout by default. Configure caching and retries to fit your application's request budget. Keys are read from your server environment; redirects are disabled.

Configuration options, HTTP errors, caching and pagination · Full integration guide

Use with ChatGPT and Codex

Prefer an assistant connection? Use the shared jsonscraper MCP server. Connect an Instagram API license, a TikTok API license, or both; each product keeps its own plan and quota. MCP source and setup.

Access, pricing and support

The SDK source is MIT-licensed. Hosted API access requires a separate Instagram license. Check current plans and get access.

Service support · SDK issues · Changelog · MIT license

Development

python3 tests/contract.py

Tests use a local/mock server and require no API key. A GitHub Actions template is available for optional automation.

The SDK has no installation or usage telemetry. README links use campaign parameters for website referral analytics. jsonscraper is independent and is not affiliated with Instagram or Meta.

About

Instagram Scraper API for Node.js and TypeScript — official SDK, profiles, media, reels, comments and search

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages