Skip to content

IPDataInfo/ipdata-bash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IPData.info Bash SDK — Free IP Geolocation & Threat Intelligence API

Shell: Bash CI License: MIT

Official Bash client for ipdata.info — a free, fast IP geolocation, ASN, and threat-intelligence API. Look up country, city, ASN, timezone, currency, and security flags (proxy/VPN/Tor/hosting) for any IPv4 or IPv6 address. Powered by ipdata.info.

This is a thin curl + jq wrapper CLI, not a library: every subcommand prints raw API JSON to stdout so you can pipe it straight into jq or any other tool in your shell pipeline.

Get a free API key

The public endpoint is free — 50 requests/min, no signup, no key. For higher rate limits and batch lookups, create a free API key at ipdata.info/register and manage it in your dashboard.

Install

curl -fsSL https://raw.githubusercontent.com/IPDataInfo/ipdata-bash/main/install.sh | sh

Or clone and install from a local checkout:

git clone https://github.com/IPDataInfo/ipdata-bash.git
cd ipdata-bash
./install.sh --prefix "$HOME/.local"

Requires bash, curl, and jq to be installed already.

Quickstart

# Free tier, no key required
ipdata lookup 8.8.8.8 | jq '{ip, country, city}'
ipdata lookup                       # your own IP
ipdata geo 1.1.1.1
ipdata asn 8.8.8.8

# With an API key (higher limits + batch)
export IPDATA_API_KEY="your-key-here"
ipdata batch 8.8.8.8 1.1.1.1

Methods

Method What it returns
lookup(ip?) Full geolocation record (own IP if omitted)
geo(ip) Geo subset (city/region/country/lat/lon/tz)
asn(ip) ASN + ISP/registry for an IP
batch(ips) Many IPs at once (requires an API key)
asnDetail(n) ASN detail incl. prefixes
asnWhoisHistory(n) ASN whois history
asnChanges() ASN change feed
threatDomain/Hash/Url(x) Threat-intel lookup (domain / file hash / URL)

CLI commands

Command Example
ipdata lookup [ip] ipdata lookup 8.8.8.8
ipdata geo <ip> ipdata geo 1.1.1.1
ipdata asn <ip> ipdata asn 8.8.8.8
ipdata batch <ip...> ipdata batch 8.8.8.8 1.1.1.1
ipdata asn-detail <number> ipdata asn-detail 15169
ipdata asn-whois-history <number> ipdata asn-whois-history 15169
ipdata asn-changes ipdata asn-changes
ipdata threat-domain <domain> ipdata threat-domain example.com
ipdata threat-hash <hash> ipdata threat-hash <md5/sha1/sha256>
ipdata threat-url <url> ipdata threat-url https://example.com
ipdata help / ipdata version

Flags: --key <key> (or IPDATA_API_KEY), --host <host> (or IPDATA_HOST). Output is always raw JSON on stdout; errors go to stderr with a non-zero exit code, so ipdata composes cleanly in shell scripts and CI pipelines.

Full response schema: ipdata.info API docs · SDK contract.

Rate limits

  • Free (ipdata.info): 50 req/min, no key.
  • Paid (pro.ipdata.info): higher limits + batch, with an API key.

Other SDKs

12 official SDKs — see the full list at ipdata.info/docs/sdks: Python, Node.js, Go, PHP, Java, Rust, .NET, Kotlin, Swift, Dart, Bash, Objective-C.

License

MIT © ipdata.info

About

Official Bash CLI for the ipdata.info IP geolocation, ASN & threat-intelligence API

Topics

Resources

License

Stars

3 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages