Help & API Reference

Basic Usage

Get your public IP address (plain text — works with curl, wget, HTTPie, etc.):

curl -s ifcfg.us/ip

Force IPv4 or IPv6:

curl -4 ifcfg.us
curl -6 ifcfg.us

JSON Response

Returns full GeoIP data including country, city, ASN, and more:

curl -s ifcfg.us/json

Force JSON via Accept header:

curl -s -H "Accept: application/json" ifcfg.us

Specific Fields

Each field is accessible as a plain-text endpoint:

curl -s ifcfg.us/country
curl -s ifcfg.us/country-iso
curl -s ifcfg.us/city
curl -s ifcfg.us/asn
curl -s ifcfg.us/asn-org
curl -s ifcfg.us/latitude
curl -s ifcfg.us/longitude
curl -s ifcfg.us/timezone
curl -s ifcfg.us/hostname
curl -s ifcfg.us/user-agent

Look Up Another IP

Query any IP address for GeoIP data:

curl -s ifcfg.us/8.8.8.8
curl -s ifcfg.us/8.8.8.8/json
curl -s ifcfg.us/2001:4860:4860::8888/json

Port Reachability

Check if a port is open on the requesting IP:

curl -s ifcfg.us/port/22
curl -s ifcfg.us/port/443

API Formats

Append .txt to any field endpoint for explicit plain text: curl -s ifcfg.us/country.txt

Rate Limits

Automated use is permitted. Please limit requests to 1 per minute. Requests exceeding this may receive a 429 Too Many Requests response.