Eclipse GeoIP REST API

REST API resolving a client IP address to a country, city or country IP-range set. Used by the Eclipse Foundation to select download mirrors and regionalise content.

Operations 3

GET /cities/{ipAddr} Get city
GET /countries/{ipAddr} Get country
GET /subnets/{ipv}/{isoCountry} Get IP ranges for country code

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/geoip-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

eclipse-geoip-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  version: 1.0.0
  title: Eclipse GeoIP REST API
  description: REST client to retrieve GeoIP information about IP addresses and to lookup IP information for countries given
    their ISO country code.
  license:
    name: Eclipse Public License - 2.0
    url: https://www.eclipse.org/legal/epl-2.0/
servers:
- url: http://api.eclipse.org/geoip
  description: Production endpoint for Eclipse GeoIP REST API
paths:
  /cities/{ipAddr}:
    description: |
      Retrieves city data for a given IP address in either IPv4 or IPv6 format. In cases where blacklisted IP's are sent (such as local addresses, or addresses outside of range), a server error is returned.
    get:
      summary: Get city
      parameters:
      - name: ipAddr
        in: path
        required: true
        description: a valid IP address to retrieve the city of origin for.
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/City'
        '400':
          description: Bad Request - Invalid IP
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /countries/{ipAddr}:
    description: |
      Retrieves country data for a given IP address in either IPv4 or IPv6 format. In cases where blacklisted IP's are sent (such as local addresses, or addresses outside of range), a server error is returned.
    get:
      summary: Get country
      parameters:
      - name: ipAddr
        in: path
        required: true
        description: a valid IP address to retrieve the country of origin for.
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Country'
        '400':
          description: Bad Request - Invalid IP
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /subnets/{ipv}/{isoCountry}:
    description: |
      Given an IP protocol version string (IPv4 or IPv6 currently) and a 2 letter ISO country code, retrieves a list of subnets registered for the given country. If an invalid IP protocol version string is given, or an invalid ISO code is passed, a server error is returned.
    get:
      summary: Get IP ranges for country code
      parameters:
      - name: ipv
        in: path
        required: true
        description: Which list of subnets to retrieve IP ranges for.
        schema:
          type: string
          enum:
          - ipv4
          - ipv6
      - name: isoCountry
        in: path
        required: true
        description: The 2 letter ISO code for the country to retrieve (case-insensitive).
        schema:
          type: string
          minLength: 2
          maxLength: 2
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IpAddresses'
        '500':
          description: Server Error
components:
  schemas:
    Country:
      type: object
      additionalProperties: false
      required:
      - geoname_id
      - iso_code
      - names
      - is_in_european_union
      properties:
        geoname_id:
          type: integer
          description: The MaxMind API unique ID for a geographic location.
        iso_code:
          type: string
          description: The 2 letter ISO code for the current country.
        names:
          type: object
          description: The locale of the country name.
          additionalProperties:
            type: string
            description: Name of the country in the given locale.
          example:
            en: Canada
            pt-BR: Canadá
        is_in_european_union:
          type: boolean
          description: TRUE if the current country is in the European Union, and false otherwise.
    City:
      type: object
      additionalProperties: false
      required:
      - geoname_id
      - names
      properties:
        geoname_id:
          type: integer
          description: The MaxMind API unique ID for a geographic location.
        names:
          type: object
          description: The locale of the country name
          additionalProperties:
            type: string
            description: Name of the country in the given locale.
          example:
            en: Ottawa
            pt-BR: Otava
    IpAddresses:
      type: array
      items:
        type: string
        description: IP ranges with subnet mask that are from the given country.
        example: 192.168.1.0/24
    Error:
      type: object
      additionalProperties: false
      required:
      - status_code
      - message
      properties:
        status_code:
          type: integer
          description: HTTP response code
        message:
          type: string
          description: Message containing error information
        url:
          type:
          - string
          - 'null'
          description: The URL
        friendly_message:
          oneOf:
          - type: string
          - type: 'null'
          description: The friendly message for the error