{
  "name": "Location Toolkit for AI agents",
  "description": "DIGIPIN and Plus Codes, Indian PIN code lookup, nearest towns worldwide, postal code checks, distances and AI address cleaning for AI agents. Pay per call via x402 (USDC on Base).",
  "url": "https://location-toolkit.ameeras-official.workers.dev",
  "version": "1.0.0",
  "provider": {
    "organization": "Location Toolkit for AI agents",
    "url": "https://location-toolkit.ameeras-official.workers.dev"
  },
  "capabilities": {
    "streaming": false
  },
  "defaultInputModes": [
    "application/json"
  ],
  "defaultOutputModes": [
    "application/json"
  ],
  "skills": [
    {
      "id": "code",
      "name": "Convert coordinates to DIGIPIN (India) and Plus Code (worldwide), or a code back to coordinates",
      "description": "Send lat+lng to get the Plus Code (Open Location Code, works everywhere, ~14 m square) and, inside India, the official India Post DIGIPIN (~4 m square). Or send any DIGIPIN or Plus Code as \"code\" to get its coordinates and cell bounds. Pure maths, exact to the official specs. POST https://location-toolkit.ameeras-official.workers.dev/code. Price 0.001 USDC.",
      "tags": [
        "location",
        "geocoding",
        "india"
      ],
      "examples": [
        "{\"lat\":13.0827,\"lng\":80.2707}"
      ]
    },
    {
      "id": "pincode",
      "name": "Look up an Indian PIN code: post offices, district, state, postal circle, centre coordinates and DIGIPIN",
      "description": "Full India Post directory (19,500+ PIN codes, 165,000+ post offices). Returns every post office under the PIN with its type (head, sub or branch office), district, state, circle, approximate centre point, its DIGIPIN and Plus Code. Not charged if the PIN does not exist. POST https://location-toolkit.ameeras-official.workers.dev/pincode. Price 0.002 USDC.",
      "tags": [
        "location",
        "geocoding",
        "india"
      ],
      "examples": [
        "{\"pincode\":\"600040\"}"
      ]
    },
    {
      "id": "reverse",
      "name": "Coordinates to nearest towns worldwide (town, region, country, distance), plus nearest PIN code inside India",
      "description": "Reverse lookup from coordinates (or a DIGIPIN / Plus Code) to the 3 nearest populated places from GeoNames (170,000+ towns worldwide) with region, country and distance in km. Inside India it also returns the nearest PIN code with district and state. Approximate (town level), not a street address. POST https://location-toolkit.ameeras-official.workers.dev/reverse. Price 0.002 USDC.",
      "tags": [
        "location",
        "geocoding",
        "india"
      ],
      "examples": [
        "{\"lat\":51.5072,\"lng\":-0.1276}"
      ]
    },
    {
      "id": "postalCheck",
      "name": "Check if a postal code has a valid format for any of 240+ countries (full lookup for India)",
      "description": "Validates postal / ZIP / PIN code format for 240+ countries and returns the cleaned form. For India it also checks that the PIN really exists and returns district and state. POST https://location-toolkit.ameeras-official.workers.dev/postal-check. Price 0.001 USDC.",
      "tags": [
        "location",
        "geocoding",
        "india"
      ],
      "examples": [
        "{\"postal_code\":\"SW1A 1AA\",\"country\":\"GB\"}"
      ]
    },
    {
      "id": "distance",
      "name": "Distance and direction between two places given as coordinates, DIGIPIN, Plus Code or Indian PIN code",
      "description": "Great-circle distance (km and miles) and compass bearing between two points. Each point can be {lat,lng}, \"13.08,80.27\", a DIGIPIN, a Plus Code or a 6-digit Indian PIN code. POST https://location-toolkit.ameeras-official.workers.dev/distance. Price 0.001 USDC.",
      "tags": [
        "location",
        "geocoding",
        "india"
      ],
      "examples": [
        "{\"from\":\"600040\",\"to\":\"560001\"}"
      ]
    },
    {
      "id": "addressClean",
      "name": "Clean a messy address from any country into structured fields, with India PIN, district and state checks",
      "description": "AI turns free-text addresses (any language or format, e.g. \"near water tank 2nd main rd AN chennai 40\") into house, street, landmark, locality, city, district, state, postal code and country. Then checks the postal code format for the country, and for India that the PIN exists and matches the district and state, with warnings and suggested fixes. Never invents a postal code. POST https://location-toolkit.ameeras-official.workers.dev/address-clean. Price 0.005 USDC.",
      "tags": [
        "location",
        "geocoding",
        "india"
      ],
      "examples": [
        "{\"address\":\"no 12, 2nd main rd, near water tank, anna nagar west, chennai 600040\",\"country\":\"IN\"}"
      ]
    },
    {
      "id": "localTime",
      "name": "Local time, time zone, DST, weekend days and business hours for any point on Earth, plus working-day counts",
      "description": "From coordinates, a Plus Code, DIGIPIN or Indian PIN: the IANA time zone, local date and time, UTC offset, whether daylight saving is active, the country's weekend days (e.g. Friday-Saturday in Saudi Arabia, Sunday only in Nepal), whether it is business hours now and when the next business day opens (local and UTC). Optional: count working days between two dates, or add N working days to a date (deadlines, delivery estimates, SLAs). Public holidays are not included. POST https://location-toolkit.ameeras-official.workers.dev/local-time. Price 0.001 USDC.",
      "tags": [
        "location",
        "geocoding",
        "india"
      ],
      "examples": [
        "{\"lat\":24.7136,\"lng\":46.6753,\"add_working_days\":5}"
      ]
    }
  ],
  "payments": {
    "x402": {
      "network": "base",
      "asset": "USDC",
      "contract": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "payTo": "0xFd0a60AAe059a256C7c56029727F7f32232B5225"
    }
  },
  "endpoints": [
    {
      "path": "/code",
      "url": "https://location-toolkit.ameeras-official.workers.dev/code",
      "method": "POST",
      "price_usdc": "0.001",
      "summary": "Convert coordinates to DIGIPIN (India) and Plus Code (worldwide), or a code back to coordinates",
      "description": "Send lat+lng to get the Plus Code (Open Location Code, works everywhere, ~14 m square) and, inside India, the official India Post DIGIPIN (~4 m square). Or send any DIGIPIN or Plus Code as \"code\" to get its coordinates and cell bounds. Pure maths, exact to the official specs.",
      "example_body": {
        "lat": 13.0827,
        "lng": 80.2707
      },
      "fields": {
        "lat": {
          "type": "number",
          "description": "Latitude (-90..90). Use with lng."
        },
        "lng": {
          "type": "number",
          "description": "Longitude (-180..180). Use with lat."
        },
        "code": {
          "type": "string",
          "description": "Instead of lat/lng: a DIGIPIN like 4P3-JK8-52C9 or a full Plus Code like 7J4VXH8P+2C"
        }
      }
    },
    {
      "path": "/pincode",
      "url": "https://location-toolkit.ameeras-official.workers.dev/pincode",
      "method": "POST",
      "price_usdc": "0.002",
      "summary": "Look up an Indian PIN code: post offices, district, state, postal circle, centre coordinates and DIGIPIN",
      "description": "Full India Post directory (19,500+ PIN codes, 165,000+ post offices). Returns every post office under the PIN with its type (head, sub or branch office), district, state, circle, approximate centre point, its DIGIPIN and Plus Code. Not charged if the PIN does not exist.",
      "example_body": {
        "pincode": "600040"
      },
      "fields": {
        "pincode": {
          "type": "string",
          "description": "6-digit Indian PIN code",
          "required": true
        }
      }
    },
    {
      "path": "/reverse",
      "url": "https://location-toolkit.ameeras-official.workers.dev/reverse",
      "method": "POST",
      "price_usdc": "0.002",
      "summary": "Coordinates to nearest towns worldwide (town, region, country, distance), plus nearest PIN code inside India",
      "description": "Reverse lookup from coordinates (or a DIGIPIN / Plus Code) to the 3 nearest populated places from GeoNames (170,000+ towns worldwide) with region, country and distance in km. Inside India it also returns the nearest PIN code with district and state. Approximate (town level), not a street address.",
      "example_body": {
        "lat": 51.5072,
        "lng": -0.1276
      },
      "fields": {
        "lat": {
          "type": "number",
          "description": "Latitude. Use with lng."
        },
        "lng": {
          "type": "number",
          "description": "Longitude. Use with lat."
        },
        "code": {
          "type": "string",
          "description": "Instead of lat/lng: a DIGIPIN or Plus Code"
        }
      }
    },
    {
      "path": "/postal-check",
      "url": "https://location-toolkit.ameeras-official.workers.dev/postal-check",
      "method": "POST",
      "price_usdc": "0.001",
      "summary": "Check if a postal code has a valid format for any of 240+ countries (full lookup for India)",
      "description": "Validates postal / ZIP / PIN code format for 240+ countries and returns the cleaned form. For India it also checks that the PIN really exists and returns district and state.",
      "example_body": {
        "postal_code": "SW1A 1AA",
        "country": "GB"
      },
      "fields": {
        "postal_code": {
          "type": "string",
          "description": "The postal code to check",
          "required": true
        },
        "country": {
          "type": "string",
          "description": "2-letter country code, e.g. IN, US, GB, DE",
          "required": true
        }
      }
    },
    {
      "path": "/distance",
      "url": "https://location-toolkit.ameeras-official.workers.dev/distance",
      "method": "POST",
      "price_usdc": "0.001",
      "summary": "Distance and direction between two places given as coordinates, DIGIPIN, Plus Code or Indian PIN code",
      "description": "Great-circle distance (km and miles) and compass bearing between two points. Each point can be {lat,lng}, \"13.08,80.27\", a DIGIPIN, a Plus Code or a 6-digit Indian PIN code.",
      "example_body": {
        "from": "600040",
        "to": "560001"
      },
      "fields": {
        "from": {
          "type": "string",
          "description": "Start point: \"lat,lng\", DIGIPIN, Plus Code or Indian PIN (or an object {lat,lng})",
          "required": true
        },
        "to": {
          "type": "string",
          "description": "End point, same formats",
          "required": true
        }
      }
    },
    {
      "path": "/address-clean",
      "url": "https://location-toolkit.ameeras-official.workers.dev/address-clean",
      "method": "POST",
      "price_usdc": "0.005",
      "summary": "Clean a messy address from any country into structured fields, with India PIN, district and state checks",
      "description": "AI turns free-text addresses (any language or format, e.g. \"near water tank 2nd main rd AN chennai 40\") into house, street, landmark, locality, city, district, state, postal code and country. Then checks the postal code format for the country, and for India that the PIN exists and matches the district and state, with warnings and suggested fixes. Never invents a postal code.",
      "example_body": {
        "address": "no 12, 2nd main rd, near water tank, anna nagar west, chennai 600040",
        "country": "IN"
      },
      "fields": {
        "address": {
          "type": "string",
          "description": "Free-text address (max 500 chars)",
          "required": true
        },
        "country": {
          "type": "string",
          "description": "Optional 2-letter country hint, e.g. IN"
        }
      }
    },
    {
      "path": "/local-time",
      "url": "https://location-toolkit.ameeras-official.workers.dev/local-time",
      "method": "POST",
      "price_usdc": "0.001",
      "summary": "Local time, time zone, DST, weekend days and business hours for any point on Earth, plus working-day counts",
      "description": "From coordinates, a Plus Code, DIGIPIN or Indian PIN: the IANA time zone, local date and time, UTC offset, whether daylight saving is active, the country's weekend days (e.g. Friday-Saturday in Saudi Arabia, Sunday only in Nepal), whether it is business hours now and when the next business day opens (local and UTC). Optional: count working days between two dates, or add N working days to a date (deadlines, delivery estimates, SLAs). Public holidays are not included.",
      "example_body": {
        "lat": 24.7136,
        "lng": 46.6753,
        "add_working_days": 5
      },
      "fields": {
        "lat": {
          "type": "number",
          "description": "Latitude. Use with lng."
        },
        "lng": {
          "type": "number",
          "description": "Longitude. Use with lat."
        },
        "code": {
          "type": "string",
          "description": "Instead of lat/lng: Plus Code, DIGIPIN or 6-digit Indian PIN"
        },
        "at": {
          "type": "string",
          "description": "Optional ISO date-time to convert instead of now, e.g. 2026-12-01T15:00:00Z"
        },
        "start_date": {
          "type": "string",
          "description": "Optional YYYY-MM-DD (default: today local)"
        },
        "end_date": {
          "type": "string",
          "description": "Optional YYYY-MM-DD: count working days from start_date to end_date"
        },
        "add_working_days": {
          "type": "number",
          "description": "Optional: add this many working days to start_date"
        },
        "open_hour": {
          "type": "number",
          "description": "Business opening hour (default 9)"
        },
        "close_hour": {
          "type": "number",
          "description": "Business closing hour (default 17)"
        }
      }
    }
  ]
}