World Time API Geo API

The Geo API from World Time API — 3 operation(s) for geo.

Operations 3

GET /geo request geolocation data based on the ip of the request. note: this is a "best guess" obtained from open-source data.
GET /geo/{ip} request geolocation data for a specific IPv4 or IPv6 address. note: this is a "best guess" obtained from open-source data.
GET /geo/{ip}.txt request geolocation data for a specific IPv4 or IPv6 address. note: this is a "best guess" obtained from open-source data.

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/worldtimeapi-geo-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

worldtimeapi-geo-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: World Time Geo API
  version: '2025-10-01'
  description: API to get the current local time details for a given timezone or IP address
servers:
- url: https://public.timeapi.world/api/
tags:
- name: Geo
paths:
  /geo:
    get:
      summary: 'request geolocation data based on the ip of the request. note: this is a "best guess" obtained from open-source data.'
      responses:
        '200':
          description: geolocation data for the client IP in JSON format
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeoJsonResponse'
              example:
                ip: 1.1.1.1
                latitude: -33.8591
                longitude: 151.2002
                accuracy_radius: 1000
                timezone: Australia/Sydney
                city: Sydney
                postal_code: '2000'
                metro_code: null
                subdivisions:
                - code: NSW
                  name: New South Wales
                country:
                  code: AU
                  name: Australia
                continent:
                  code: OC
                  name: Oceania
                is_in_european_union: false
                is_anonymous_proxy: false
                is_satellite_provider: false
                is_anycast: false
        default:
          $ref: '#/components/responses/ErrorJsonResponse'
      tags:
      - Geo
  /geo/{ip}:
    get:
      summary: 'request geolocation data for a specific IPv4 or IPv6 address. note: this is a "best guess" obtained from open-source data.'
      parameters:
      - name: ip
        in: path
        required: true
        description: IPv4 or IPv6 address
        schema:
          type: string
        examples:
          ipv4:
            value: 1.1.1.1
            summary: IPv4 address
          ipv6:
            value: 2606:4700:4700::1111
            summary: IPv6 address (Cloudflare DNS)
      responses:
        '200':
          description: geolocation data for the specified IP in JSON format
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeoJsonResponse'
              example:
                ip: 1.1.1.1
                latitude: -33.8591
                longitude: 151.2002
                accuracy_radius: 1000
                timezone: Australia/Sydney
                city: Sydney
                postal_code: '2000'
                metro_code: null
                subdivisions:
                - code: NSW
                  name: New South Wales
                country:
                  code: AU
                  name: Australia
                continent:
                  code: OC
                  name: Oceania
                is_in_european_union: false
                is_anonymous_proxy: false
                is_satellite_provider: false
                is_anycast: false
        default:
          $ref: '#/components/responses/ErrorJsonResponse'
      tags:
      - Geo
  /geo/{ip}.txt:
    get:
      summary: 'request geolocation data for a specific IPv4 or IPv6 address. note: this is a "best guess" obtained from open-source data.'
      parameters:
      - name: ip
        in: path
        required: true
        description: IPv4 or IPv6 address
        schema:
          type: string
        examples:
          ipv4:
            value: 1.1.1.1
            summary: IPv4 address
          ipv6:
            value: 2606:4700:4700::1111
            summary: IPv6 address (Cloudflare DNS)
      responses:
        '200':
          description: geolocation data for the specified IP in plain text
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/GeoTextResponse'
              example: 'ip: 1.1.1.1

                latitude: -33.8591

                longitude: 151.2002

                accuracy_radius: 1000

                timezone: Australia/Sydney

                city: Sydney

                postal_code: 2000

                subdivisions: NSW (New South Wales)

                country_code: AU

                country_name: Australia

                continent_code: OC

                continent_name: Oceania

                is_in_european_union: false

                is_anonymous_proxy: false

                is_satellite_provider: false

                is_anycast: false

                '
        default:
          $ref: '#/components/responses/ErrorTextResponse'
      tags:
      - Geo
components:
  schemas:
    GeoTextResponse:
      type: string
      description: 'geolocation details, as per the GeoJsonResponse response, in the format `key: value`, one item per line'
    ErrorJsonResponse:
      required:
      - error
      properties:
        error:
          type: string
          description: details about the error encountered
    GeoSubdivision:
      type: object
      required:
      - code
      - name
      properties:
        code:
          type: string
          description: ISO 3166-2 subdivision code
        name:
          type: string
          description: subdivision name
    GeoJsonResponse:
      type: object
      required:
      - ip
      - latitude
      - longitude
      - accuracy_radius
      - timezone
      - city
      - postal_code
      - metro_code
      - subdivisions
      - country
      - continent
      - is_in_european_union
      - is_anonymous_proxy
      - is_satellite_provider
      - is_anycast
      properties:
        ip:
          type: string
          description: the IP address that was looked up
        latitude:
          type:
          - number
          - 'null'
          description: latitude coordinate
        longitude:
          type:
          - number
          - 'null'
          description: longitude coordinate
        accuracy_radius:
          type:
          - integer
          - 'null'
          description: accuracy radius in kilometers
        timezone:
          type:
          - string
          - 'null'
          description: timezone in `Area/Location` or `Area/Location/Region` format
        city:
          type:
          - string
          - 'null'
          description: city name
        postal_code:
          type:
          - string
          - 'null'
          description: postal code
        metro_code:
          type:
          - integer
          - 'null'
          description: metro code (US only)
        subdivisions:
          type: array
          description: list of subdivisions (e.g., states, provinces)
          items:
            $ref: '#/components/schemas/GeoSubdivision'
        country:
          type: object
          required:
          - code
          - name
          properties:
            code:
              type:
              - string
              - 'null'
              description: ISO 3166-1 alpha-2 country code
            name:
              type:
              - string
              - 'null'
              description: country name
        continent:
          type: object
          required:
          - code
          - name
          properties:
            code:
              type:
              - string
              - 'null'
              description: two-letter continent code
            name:
              type:
              - string
              - 'null'
              description: continent name
        is_in_european_union:
          type: boolean
          description: whether the location is in the European Union
        is_anonymous_proxy:
          type: boolean
          description: whether the IP belongs to an anonymous proxy (VPN, Tor, etc.)
        is_satellite_provider:
          type: boolean
          description: whether the IP belongs to a satellite internet provider
        is_anycast:
          type: boolean
          description: whether the IP is an anycast address
    ErrorTextResponse:
      type: string
      description: details about the error encountered in plain text
  responses:
    ErrorJsonResponse:
      description: an error response in JSON format
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorJsonResponse'
    ErrorTextResponse:
      description: an error response in plain text
      content:
        text/plain:
          schema:
            $ref: '#/components/schemas/ErrorTextResponse'