{
  "name": "Location Toolkit for AI agents",
  "tools": [
    {
      "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"
        }
      }
    }
  ],
  "free_sample": "3 free calls per day",
  "payment": "x402, USDC on Base",
  "guide": "https://location-toolkit.ameeras-official.workers.dev/llms.txt",
  "openapi": "https://location-toolkit.ameeras-official.workers.dev/openapi.json",
  "mcp": "https://location-toolkit.ameeras-official.workers.dev/mcp",
  "examples": "https://location-toolkit.ameeras-official.workers.dev/examples",
  "try": "https://location-toolkit.ameeras-official.workers.dev/try",
  "data_credits": {
    "india_pincodes": "India Post All-India Pincode Directory (data.gov.in, Government Open Data License - India)",
    "world_places": "GeoNames, geonames.org (CC BY 4.0)",
    "codes": "DIGIPIN: Department of Posts, Govt. of India (open specification); Plus Codes: Open Location Code by Google (Apache 2.0)",
    "postal_formats": "postal-codes-js (Apache 2.0)"
  }
}