Geo

Retrieve detailed geolocation information for a visitor’s or user’s IP address

Changed on

This API allows you to retrieve detailed geolocation information for a visitor’s or user’s IP address.

By using the IP Geolocation method, you can access data such as the user’s country, city, ISP, and more, enabling you to personalize user experiences, enhance security, and make data-driven decisions based on geographic insights.

get/geo/ip

Request

  • Base URL
    https://v2.greipapi.com
  • URL
    https://v2.greipapi.com/geo/ip
  • Auth
    HTTP bearer

Query parameters

paramsstring
Example:security,timezone,currency,device

The params command selects optional response modules. Basic ip and geo fields are always included.

Recognized module names: security, currency, timezone, location, and/or device.

Unrecognized tokens are accepted but do not add modules.

Sample value: security,timezone,currency.

langstring
Example:AR

The lang command is used to get a response in a specific language.

callbackstring
Example:my_function_name

The callback command can help you make the response as a JSONP format.

Expected values: any name that can be used as a function name in Javascript, e.g: myFunctionName.

formatstring
Example:JSON

The format command is used to get a response in a specific format.

modestring
Example:test

The mode command is used to in the development stage to simulate the integration process before releasing it to the production environment.

Expected values: live, or test.

sourcestring
amountstring

Optional amount string used by usage and rate-limit gates.

user_idstring
Example:UID-12345

The user_id query parameter identifies requests from specific users for monitoring in the Events page. See the user identifier options page for details.

Response

OK

successboolean required
execution_msinteger required

Example response

{
  "success": true,
  "data": {
    "asn": {
      "number": "AS15169",
      "cidr": "8.8.8.0/24"
    }
  },
  "execution_ms": 42
}

Changes

    • info

      api tag Geo added

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the new optional query request parameter amount

    • info

      added the media type application/json for the response with the status