Privex's IPv4 / IPv6 Information Page

Find out your IP address and browser information, including both your IPv4 and IPv6 address, your user agent, your location, and more!

We are Privex Inc, a privacy focused server hosting company based in Belize.

In the networking world, we're AS210083 PRIVEX

Peering with Privex /// Our main website

Programmatic usage of our IP Information service

Quickstart - A mix of the most useful/popular queries

##### Get just your IPv4/v6 address
curl -fsSL https://address.computer/flat
# 2a07:e00::333

##### Force cURL to use IPv4
curl -4 -fsSL https://address.computer/flat
# 185.130.44.108

##### Or simply request our v4/v6-only subdomain
curl -fsSL https://v4.address.computer/flat
# 185.130.44.108
curl -fsSL https://v6.address.computer/flat
# 2a07:e00::333

##### Get the GeoIP country for your IP 
curl -fsSL https://address.computer/flat/country
# Sweden

##### Get your full location (city, postcode, country)
curl -fsSL https://address.computer/flat/location
# Stockholm, 173 11, Sweden

##### Get your ISP's name and AS Number (ASN)
curl -fsSL https://address.computer/flat/asninfo
# Privex Inc.
# AS210083

##### Get all information about your IP in plain text greppable format
curl -fsSL https://address.computer/index.txt
curl -H 'Accept: text/plain' -fsSL https://address.computer/  # ALTERNATIVE
curl -fsSL https://address.computer/?format=text  # ALTERNATIVE
#IP: 2a07:e01:123::456
#Version: ipv6
#Hostname:
#UserAgent: curl/7.54.0
#Country: Sweden
#CountryCode: SE
#City: Stockholm
#Postcode: 173 11
#Lat: 59.3333
#Long: 18.05
#ASNum: 210083
#ASName: Privex Inc.
#Network: 2a07:e01::/32

##### Get all information about your IP as JSON
curl -fsSL https://address.computer/index.json
curl -H 'Accept: application/json' -fsSL https://address.computer/  # ALTERNATIVE
curl -fsSL https://address.computer/?format=json  # ALTERNATIVE
#  {
#    "error": false,
#    "geo": {
#      "as_name": "Privex Inc.",
#      "as_number": 210083,
#      "city": "Stockholm",
#      "country": "Sweden",
#      "country_code": "SE",
#      "error": false,
#      "ip_address": "2a07:e01:123::456",
#      "lat": 59.3333,
#      "long": 18.05,
#      "network": "2a07:e01::/32",
#      "postcode": "173 11"
#    },
#    "hostname": "",
#    "ip": "2a07:e01:123::456",
#    "ip_type": "ipv6",
#    "ip_valid": true,
#    "messages": [],
#    "ua": "curl/7.54.0"
#  }

##### Get all information about your IP as YAML
curl -fsSL https://address.computer/index.yml
curl -H 'Accept: application/yaml' -fsSL https://address.computer/  # ALTERNATIVE
curl -fsSL https://address.computer/?format=yml  # ALTERNATIVE
#  error: false
#  geo:
#    as_name: Privex Inc.
#    as_number: 210083
#    city: Stockholm
#    country: Sweden
#    country_code: SE
#    error: false
#    ip_address: 2a07:e01:123::456
#    lat: 59.3333
#    long: 18.05
#    network: 2a07:e01::/32
#    postcode: 173 11
#  hostname: ''
#  ip: 2a07:e01:123::456
#  ip_type: ipv6
#  ip_valid: true
#  messages: []
#  ua: curl/7.54.0

##### (JSON) Get information about any v4/v6 IP
curl -fsSL https://address.computer/lookup/185.130.47.1
#  {
#    "error": false,
#    "geo": {
#      "as_name": "Privex Inc.",
#      "as_number": 210083,
#      "city": "Amsterdam",
#      "country": "Netherlands",
#      "country_code": "NL",
#      "error": false,
#      "ip_address": "185.130.47.1",
#      "lat": 52.352,
#      "long": 4.9392,
#      "network": "185.130.44.0/22",
#      "postcode": "1098"
#    },
#    "hostname": "n9k.ams.nl1.privex.cc",
#    "ip": "185.130.47.1",
#    "ip_type": "ipv4",
#    "ip_valid": true,
#    "messages": [],
#    "ua": "curl/7.54.0"
#  }

##### (Plain Text) Get information about any v4/v6 IP
curl -fsSL https://address.computer/lookup.txt/185.130.47.1
curl -H 'Accept: text/plain' -fsSL https://address.computer/lookup/185.130.47.1  # ALTERNATIVE
curl -fsSL https://address.computer/lookup/185.130.47.1?format=text  # ALTERNATIVE

##### (YAML) Get information about any v4/v6 IP
curl -fsSL https://address.computer/lookup.yml/185.130.47.1
curl -H 'Accept: application/yaml' -fsSL https://address.computer/lookup/185.130.47.1  # ALTERNATIVE
curl -fsSL https://address.computer/lookup/185.130.47.1?format=yml  # ALTERNATIVE

##### (Single Data) Get individual pieces of info about any v4/v6 IP
curl -fsSL https://address.computer/lookup/2a07:e00::333/city
# Stockholm
curl -fsSL https://address.computer/lookup/2a07:e00::333/hostname
# se.dns.privex.io
curl -fsSL https://address.computer/lookup/2a07:e00::333/coords
# 59.3333, 18.0500
curl -fsSL https://address.computer/lookup/2a07:e00::333/asninfo
# Privex Inc.
# AS210083

Supported output formats

Some of our pages / endpoints support outputting their data in multiple formats.

You can select a format either by using ?format=TYPE - which is high priority, or you can use the Accept: header.

You can also specify format as both an encoded POST form, or as JSON in the POST body.

Example Usage for format param and Accept header

curl https://address.computer/?format=json
curl -H 'Accept: application/json' https://address.computer/

curl https://address.computer/?format=yaml 
curl -H 'Accept: application/yaml' https://address.computer/

curl https://address.computer/lookup/185.130.44.123?format=yaml 
curl -H 'Accept: application/yaml' https://address.computer/lookup/185.130.44.123

# Using the HTTPie tool to send a JSON body POST request 
http -p hbHB POST https://address.computer/lookup/ format=plain addr=185.130.44.56

HTML

At the time of writing, currently only the index page ( / ), as well as this page ( /api/ ) support outputting their data in HTML format - though /api/ (this page) is purely a documentation page, and does not have any special functionality anyway.

HTML is used by default for the index page, however if needed, you can manually specify that you want HTML output by either passing format=html as a GET/POST (i.e. /?format=html) argument, or by ensuring that text/html is the highest priority in your Accept: header.

Matching types for format= and Accept: are:

JSON

The JSON format is available as a format option on the following endpoints:

Matching types for format= and Accept: are:

YAML (YML)

The YAML format is available as a format option on the following endpoints:

Matching types for format= and Accept: are:

Plain Text

The Plain Text format is available as a format option on the following endpoints:

Matching types for format= and Accept: are:

Index Endpoint

The index endpoint at / - by default renders an HTML web page, designed to be read by humans. The HTML page displays the current IP you're connecting from - directly within the HTML body, while the IPv4/IPv6 sections are populated using JavaScript via AJAX queries to the JSON format of this endpoint on our v4 and v6-only domains.

Endpoints:

/
/index.txt
/index.yml
/index.yaml
/index.json
/index.html

Supported Output Formats

Example Queries

JSON Output for Index Endpoint

On URLs which support JSON output, you can either pass the GET parameter ?format=json - or you can set the Accept header so that application/json is the most preferred content requested from the server.

You can query the main site to get information about your system's most preferred IP version, or if the client you're querying with (e.g. curl with -4 or -6) allows specifying the IP version, then you can select an IP version using your client.

curl https://address.computer/?format=json

# Alternative - send the header 'Accept: application/json'
curl -H 'Accept: application/json' https://address.computer/

# Make the request using IPv4
curl -4 https://address.computer/?format=json
# Make the request using IPv6
curl -6 https://address.computer/?format=json

Example Output:

{
    "error": false,
    "geo": {
        "as_name": "Privex Inc.",
        "as_number": 210083,
        "city": "Stockholm",
        "country": "Sweden",
        "country_code": "SE",
        "error": false,
        "ip_address": "2a07:e01:123::456",
        "lat": 59.3333,
        "long": 18.05,
        "network": "2a07:e01::/32",
        "postcode": "173 11"
    },
    "hostname": "",
    "ip": "2a07:e01:123::456",
    "ip_type": "ipv6",
    "ip_valid": true,
    "messages": [],
    "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:89.0) Gecko/20100101 Firefox/89.0"
}

Alternatively, you can query our IPv4-only / IPv6-only domain to force your client to use a specific IP version to obtain the results:

curl https://v4.address.computer/?format=json

curl https://v6.address.computer/?format=json

Plain Output for Index Endpoint

You can request plain text output from our index page using ?format=plain - or you can set your Accept to prioritise text/plain.

curl https://address.computer/?format=plain

# Alternative - send the header 'Accept: text/plain'
curl -H 'Accept: text/plain' https://address.computer/

` Result:

IP: 2a07:e01:123::456
Version: ipv6
Hostname:
UserAgent: HTTPie/2.0.0
Country: Sweden
CountryCode: SE
City: Stockholm
Postcode: 173 11
Lat: 59.3333
Long: 18.05
ASNum: 210083
ASName: Privex Inc.
Network: 2a07:e01::/32

Lookup Endpoint

The lookup endpoint allows you to query General + GeoIP information about any arbitrary IPv4/IPv6 address.

Endpoints:

/lookup/
/lookup.yml/
/lookup.yaml/
/lookup.json/
/lookup.txt/
/lookup/<addr>/(<type>/)
/lookup.yml/<addr>/(<type>/)
/lookup.yaml/<addr>/(<type>/)
/lookup.json/<addr>/(<type>/)
/lookup.txt/<addr>/(<type>/)

Supported Output Formats

Example Queries

Standard GET request

Command:

user@privex-example ~ $ http -p hbHB GET https://address.computer/lookup/

Result:

GET /lookup/ HTTP/1.1

HTTP/1.0 200 OK
Content-Length: 471
Content-Type: application/json

{
    "error": false,
    "geo": {
        "as_name": "Privex Inc.",
        "as_number": 210083,
        "city": "Stockholm",
        "country": "Sweden",
        "country_code": "SE",
        "error": false,
        "ip_address": "2a07:e01:123::456",
        "lat": 59.3333,
        "long": 18.05,
        "network": "2a07:e01::/32",
        "postcode": "173 11"
    },
    "hostname": "",
    "ip": "2a07:e01:123::456",
    "ip_type": "ipv6",
    "ip_valid": false,
    "messages": [],
    "ua": "HTTPie/2.0.0"
}

GET Request with IP in URI + yml format

Command:

user@privex-example ~ $ http -p hbHB GET https://address.computer/lookup/185.130.46.70?format=yml
GET /lookup/185.130.46.70?format=yml HTTP/1.1

HTTP/1.0 200 OK
Content-Length: 352
Content-Type: application/yaml

error: false
geo:
  as_name: Privex Inc.
  as_number: 210083
  city: Tokyo
  country: Japan
  country_code: JP
  error: false
  ip_address: 185.130.46.70
  lat: 35.6887
  long: 139.745
  network: 185.130.46.0/24
  postcode: 102-0082
hostname: 185.130.46.70.static.privex.cc
ip: 185.130.46.70
ip_type: ipv4
ip_valid: false
messages: []
ua: HTTPie/2.0.0

POST Request with IP in JSON body + plain format

Command:

user@privex-example ~ $  http -p hbHB POST https://address.computer/lookup.txt/ ip=185.130.44.56
POST /lookup.txt/ HTTP/1.1
Accept: application/json, */*
Content-Type: application/json

{
    "ip": "185.130.44.56"
}

HTTP/1.0 200 OK
Content-Length: 247
Content-Type: text/plain

IP: 185.130.44.56
Version: ipv4
Hostname: 185.130.44.56.static.privex.cc
UserAgent: HTTPie/2.0.0
Country: Sweden
CountryCode: SE
City: Stockholm
Postcode: 173 11
Lat: 59.3333
Long: 18.05
ASNum: 210083
ASName: Privex Inc.
Network: 185.130.44.0/23

Flat Type Summaries

These Flat Types can be used both with /flat/<type> as well as /lookup/<ip>

Flat Endpoint

We also have the "flat" endpoint:

/flat(/<type>)

This is designed for use in shellscripts (bash/zsh/etc.), and other kinds of situations where you might not be able to parse JSON/YML/etc.

Get just your IP address

user@host ~ $ curl https://address.computer/flat
2a07:e01:123::456

user@host ~ $ curl -4 https://address.computer/flat
185.130.44.140

Get just your User Agent

user@host ~ $ curl https://address.computer/flat/ua
curl/7.54.0

Get just the Country (GeoIP) of your IP address

user@host ~ $ curl https://address.computer/flat/country
Sweden

Get just the City (GeoIP) of your IP address

user@host ~ $ curl https://address.computer/flat/city
Stockholm

Get your full GeoIP location, formatted like an address

user@host ~ $ curl https://address.computer/flat/location
Stockholm, 173 11, Sweden

Get your GeoIP location co-ordinates, returned as latitude, longitude

user@host ~ $ curl https://address.computer/flat/pos
59.3333, 18.0500

Get your ISP/ASN name and their AS number, separated by a newline

user@host ~ $ curl https://address.computer/flat/asninfo
Privex Inc.
AS210083