# IPinfo API: Get IP location

> Finds the public location and network operator of an IPv4 or IPv6 address. Private and reserved addresses have no public location.

Unofficial. Not affiliated with or endorsed by IPinfo.

- Page: https://fous.com/methods/ipinfo.io/get-ip-location
- Method: `ipinfo.io/get_ip_location`, version 1
- Website: ipinfo.io
- Returns: city, region, country, postal code, time zone, organization, AS number, coordinates
- Effect: read (it gets data and changes nothing)
- Sign-in: none needed
- Cost: 1 credit per completed run (1¢ with pay as you go); failed runs are free
- Verified: Nov 2, 2026

## Inputs

| Field | Type | Required | In the run below | Description |
|---|---|---|---|---|
| `ip_address` | string | yes | `"8.8.8.8"` | Public IPv4 or IPv6 address, for example 8.8.8.8. |

## Output

From a run on Oct 23, 2026. Its input:

```json
{
  "ip_address": "8.8.8.8"
}
```

Its output:

```json
{
  "city": "Mountain View",
  "region": "California",
  "hostname": "dns.google",
  "latitude": 38.0088,
  "longitude": -122.1175,
  "time_zone": "America/Los_Angeles",
  "ip_address": "8.8.8.8",
  "ipinfo_link": "https://ipinfo.io/8.8.8.8",
  "postal_code": "94043",
  "country_code": "US",
  "country_name": "United States",
  "organization": "Google LLC",
  "network_number": "AS15169"
}
```

## Run it

From code, with a Fous API key in `FOUS_API_KEY`; the answer's `data` holds the output:

```bash
curl https://api.fous.com/v1/runs \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"method":"ipinfo.io/get_ip_location","input":{"ip_address":"8.8.8.8"}}'
```

From an AI agent connected to the Fous MCP server: its `run` with the same method and input. To connect one, give it `set up https://fous.com/SKILL.md`.

## Ask your agent

- Where is the IP address 8.8.8.8 located? I need the city and country.
- Look up the network operator and AS number for 1.1.1.1 on ipinfo.io.
- What timezone and postal code belong to the public IP 203.0.113.45?
- Find the coordinates and region for 2001:4860:4860::8888 please.
- Which organization owns the IP 185.199.108.153, and what city is it in?

## Input schema

```json
{
  "type": "object",
  "required": [
    "ip_address"
  ],
  "properties": {
    "ip_address": {
      "type": "string",
      "description": "Public IPv4 or IPv6 address, for example 8.8.8.8."
    }
  }
}
```

## Output schema

```json
{
  "type": "object",
  "required": [
    "ip_address",
    "hostname",
    "city",
    "region",
    "country_name",
    "country_code",
    "postal_code",
    "time_zone",
    "organization",
    "network_number",
    "ipinfo_link",
    "latitude",
    "longitude"
  ],
  "properties": {
    "city": {
      "type": [
        "string",
        "null"
      ],
      "description": "City, if available."
    },
    "region": {
      "type": [
        "string",
        "null"
      ],
      "description": "Region or state, if available."
    },
    "hostname": {
      "type": [
        "string",
        "null"
      ],
      "description": "Hostname, if available."
    },
    "latitude": {
      "type": [
        "number",
        "null"
      ],
      "description": "Latitude, if available."
    },
    "longitude": {
      "type": [
        "number",
        "null"
      ],
      "description": "Longitude, if available."
    },
    "time_zone": {
      "type": [
        "string",
        "null"
      ],
      "description": "IANA time zone, if available."
    },
    "ip_address": {
      "type": "string",
      "description": "Looked-up IP address."
    },
    "ipinfo_link": {
      "type": "string",
      "description": "IPinfo page for this address."
    },
    "postal_code": {
      "type": [
        "string",
        "null"
      ],
      "description": "Postal code, if available."
    },
    "country_code": {
      "type": [
        "string",
        "null"
      ],
      "description": "Two-letter country code."
    },
    "country_name": {
      "type": [
        "string",
        "null"
      ],
      "description": "Full country name."
    },
    "organization": {
      "type": [
        "string",
        "null"
      ],
      "description": "Organization or internet provider name, if available."
    },
    "network_number": {
      "type": [
        "string",
        "null"
      ],
      "description": "Autonomous system number, if available."
    }
  }
}
```

## See more

- [Postcodes.io API: Get postcode details](https://fous.com/methods/postcodes.io/get-postcode.md): Looks up a UK postcode on Postcodes.io, including its location, administrative areas and whether it is still in use. Retired postcodes return location and retirement year only.
- [U.S. Census Bureau API: Get address details](https://fous.com/methods/census.gov/get-address-details.md): Matches a US street address and returns its city or place, county, state, ZIP code, census tract, congressional and state legislative districts, coordinates and FIPS codes. Districts follow the Census Geocoder's current geography vintage and may differ from sitting representation.
- [Zippopotam.us API: Search postal codes](https://fous.com/methods/zippopotam.us/search-postal-codes.md): Finds postal codes, place names and coordinates for a town and state or region in a country covered by Zippopotam.us.
- [Zippopotam.us API: Get postal code](https://fous.com/methods/zippopotam.us/get-postal-code.md): Looks up the places, regions and coordinates for a postal code in a supported country on Zippopotam.us.
- [OpenStreetMap API: Get coordinates for an address](https://fous.com/methods/openstreetmap.org/get-coordinates.md): Finds map coordinates and address details for an address or place on OpenStreetMap, optionally restricted to a country.
- [Google API: Get place](https://fous.com/methods/google.com/get-place.md): Looks up a public Google Maps place by name and location and returns its profile: address, rating, hours, phone, website and photos.
- [AirNow API: Get air quality](https://fous.com/methods/airnow.gov/get-air-quality.md): Gets AirNow current air quality, pollutant readings and today's and tomorrow's forecasts for a US city or ZIP code, or a covered Canadian or Mexican city.
- [Postcodes.io API: List nearby postcodes](https://fous.com/methods/postcodes.io/list-nearby-postcodes.md): Lists UK postcodes nearest to a postcode or named place, with distance, ward, council and coordinates. For places sharing a name, a city or town is preferred.
