Official IPstack SDK

Integrate IPstack into your applications with our official JavaScript SDK. Easy to use with comprehensive documentation, code examples, and enterprise-grade reliability.

SETUP

Get Started in Minutes

From installation to your first API call in just a few simple steps

01

Intallation

Install the SDK using NPM.
				
					npm i apilayer-ipstack
				
			

02

Configuration

Sign up to IPstack and get your API Key to configure the SDK.

03

Start Building

Use the SDK methods to integrate IP geolocation into your application seamlessly.

				
					import Ipstack from "ipstack-sdk";
 
// Initialize with your API key
const ipstack = new Ipstack("YOUR_API_KEY");
 
// Single IP lookup
ipstack
    .standard("134.201.250.155")
    .then((data) => console.log(data))
    .catch((error) => console.error(error));
 
// Bulk IP lookup
ipstack
    .bulk("134.201.250.155,72.229.28.185")
    .then((data) => console.log(data))
    .catch((error) => console.error(error));
 
// Requester IP lookup
ipstack.requestIP().then((data) => console.log(data));
				
			

Ready to Get Started with JSON-powered IPstack API?

Join over 100,000 developers who trust IPstack for reliable IP
geolocation data. Start with our free plan and scale as you grow.