Lookup IP Addresses in the Web Services

Please note: Beginning in March 2024, MaxMind will begin enforcing its policies around API requests and endpoints. We will require use of the HTTPS protocol for all requests, and will require requests to use the proper hostname as listed below, and on our Developer Portal.

The preferred method of looking up IP address in the GeoIP web services is to use a client API or to directly interface with MaxMind's REST API. Read a quick-start technical integration guide on our developer's site.

In addition to using our APIs, we have several tools that can be used to look up IP addresses using your account portal. You can also do one-off lookups from the command line. In this article we outline:

Overview of GeoIP web service lookup methods

Lookup Method Programming Knowledge Required Used For Documentation
Online Lookup None Looking up 1-50 IPs and getting the majority of GeoIP2 outputs. See below.
Batch Lookup None Looking up hundreds to millions of IPs with output in CSV or JSON. Reviewing the full set of service outputs (JSON). See below.
Command Line (curl) Low Developers testing to integrate directly with our REST API (i.e., not using client APIs). Learn more in our developer's documentation.
Full Integration Intermediate Full production of applications. Read a quick-start technical integration guide on our developer's site.

Looking up IP addresses using any of these methods consumes service credit at the per-query rate for the selected service type. Learn more about purchasing and using service credit.

Use the online lookup form to lookup fifty or fewer IPs using the account portal

You can use the online lookup form in your account portal to manually lookup 50 or fewer IP addresses. If you are performing a lookup using the GeoIP2 Insights web service, population density and average income will not be displayed in this tool. All other GeoIP2 data will be displayed.

This feature is available to admin users and standard users with product/service permissions. Learn more about user permissions.

Click on 'Online Lookup' in the GeoIP2 / GeoLite2 menu in your account portal [direct link, login required].

Select the GeoIP2 service you wish to query from the dropdown menu at the top of the form. You can query GeoIP2 Country, City Plus, or Insights web service. Learn how these web services differ in IP geolocation data, and IP intelligence data.

Enter up to 50 IP addresses in the space provided, with one IP address per line.

Click the blue "Submit" button, and the results of your lookup will be displayed in your web browser. If you need a record of these lookups, make sure to copy and paste the data before you navigate away from this page or you will have to perform the lookup again.

Alternatively, you can use the batch lookup form, described below, and download a record of the results.

Use the batch lookup form to lookup hundreds to millions of IPs using the account portal

You can use the batch lookup form in your account portal to manually lookup hundreds to millions of IP addresses and export the results as a CSV and JSON file.

If you are performing a lookup using the GeoIP2 Insights web service, population density and average income will not be included in the CSV file. All other GeoIP2 data will be included. The JSON file will include all data for the service you select.

This feature is available to admin users and standard users with product/service permissions. Learn more about user permissions.

Click on 'Batch Lookup' in the GeoIP2 / GeoLite2 menu in your account portal [direct link, login required].

Enter the email address where you would like to receive a link to download your query results. Then, select the GeoIP2 service you wish to query from the dropdown menu at the top of the form. You can query GeoIP2 Country, City Plus, or Insights web service. Learn how these web services differ in IP geolocation data, and IP intelligence data.

Upload a plain text file with the IP addresses you would like to query, one per line, and click the blue "Upload" button.

Once the file has been processed you will receive an email with a link to access both the CSV and JSON format files containing the results of your lookups.

API Endpoints for GeoIP web service lookups

All API requests to MaxMind products and services must be submitted with HTTPS. For ease of reference, we have listed the appropriate URIs for all GeoIP web services:

  • GeoIP web services
    https://geoip.maxmind.com/geoip/v2.1/country/{ip_address}
    https://geoip.maxmind.com/geoip/v2.1/city/{ip_address}
    https://geoip.maxmind.com/geoip/v2.1/insights/{ip_address}
    [See our Developer Documentation]

  • GeoIP web service client-side Javascript
    https://geoip-js.com/js/apis/geoip2/v2.1/geoip2.js (preferred), or
    https://js.maxmind.com/js/apis/geoip2/v2.1/geoip2.js, or
    https://geoip.maxmind.com/js/apis/geoip2/v2.1/geoip2.js
    [See our Developer Documentation]

  • GeoIP Legacy web services
    https://geoip.maxmind.com/geoip/v1.0/country, or
    https://geoip.maxmind.com/a

    https://geoip.maxmind.com/geoip/v1.0/city, or
    https://geoip.maxmind.com/b

    https://geoip.maxmind.com/geoip/v1.0/city-isp-org, or
    https://geoip.maxmind.com/f

    https://geoip.maxmind.com/geoip/v1.0/insights, or
    https://geoip.maxmind.com/e
    [See our Developer Documentation]

 

This page was last updated on .

Was this article helpful?