Api Endpoint

Plus Code Encoder and Decoder

Plus code (Open Location Code) encoder and decoder: encode coordinates as a plus code at a chosen length, or decode a full code back to its bounding box and centre. Also shortens a full code against a reference coordinate and recovers a shortened code given a reference, which is how plus codes are normally exchanged in text. Returns code length, precision in metres and validity.

Open interactive test console

Offering

Provider
api.duoleads.com
Method
GET
Offering type
Api Endpoint
Transport type
http
Category
Location And Travel
Delivery
Not provided
Pricing model
Not provided
x402 version
2

Endpoint context

URL
https://api.duoleads.com/v1/geo/pluscode
MIME type
application/json
First seen
2026-10-16T01:50:38.788Z
Last seen
Tags
plus-code, pluscode, open-location-code, Geo

Payment pricing

x402 payment terms are the authoritative price for calling this endpoint.

Payment option 1
0.05 USDC
Atomic price: 50000 · Network: eip155:8453 · Asset: USDC · Scheme: exact
Raw x402 terms
[
  {
    "scheme": "exact",
    "network": "eip155:8453",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "50000",
    "payTo": "0xCD673f7e1daD254347AEab6be0DEFe8b9C6b3A39"
  }
]

Observed health

Status
Healthy
Latest latency
46 ms
Average latency
544 ms
HTTP status
402
Last checked
Reachability
100% over 14 checks

Latency is measured to the first response headers. A reachable result does not verify response accuracy or merchant identity.

Input schema

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "http"
    },
    "method": {
      "type": "string",
      "enum": [
        "GET"
      ]
    },
    "queryParams": {
      "type": "object",
      "properties": {
        "op": {
          "type": "string",
          "description": "encode (default), decode, shorten or recover.",
          "enum": [
            "encode",
            "decode",
            "shorten",
            "recover"
          ],
          "maxLength": 64,
          "default": "encode"
        },
        "lat": {
          "type": "string",
          "description": "Latitude for op=encode.",
          "pattern": "^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][+-]?\\d+)?$",
          "maxLength": 64
        },
        "lon": {
          "type": "string",
          "description": "Longitude for op=encode.",
          "pattern": "^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][+-]?\\d+)?$",
          "maxLength": 64
        },
        "code": {
          "type": "string",
          "description": "Plus code for decode, shorten or recover.",
          "maxLength": 20
        },
        "length": {
          "type": "string",
          "description": "Integer code length for op=encode: one of 2,4,6,8,10 (default),11,12,13,14,15. Other integers in 2-15 are 400 UNSUPPORTED_VALUE.",
          "pattern": "^[+-]?\\d+$",
          "maxLength": 64,
          "default": "10"
        },
        "ref_lat": {
          "type": "string",
          "description": "Reference latitude for op=shorten/recover.",
          "pattern": "^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][+-]?\\d+)?$",
          "maxLength": 64
        },
        "ref_lon": {
          "type": "string",
          "description": "Reference longitude for op=shorten/recover.",
          "pattern": "^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][+-]?\\d+)?$",
          "maxLength": 64
        }
      },
      "required": []
    }
  },
  "required": [
    "type",
    "method"
  ],
  "additionalProperties": false
}

Output schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "input": {
      "additionalProperties": false,
      "properties": {
        "method": {
          "enum": [
            "GET"
          ],
          "type": "string"
        },
        "queryParams": {
          "properties": {
            "code": {
              "description": "Plus code for decode, shorten or recover.",
              "maxLength": 20,
              "type": "string"
            },
            "lat": {
              "description": "Latitude for op=encode.",
              "maxLength": 64,
              "pattern": "^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][+-]?\\d+)?$",
              "type": "string"
            },
            "length": {
              "default": "10",
              "description": "Integer code length for op=encode: one of 2,4,6,8,10 (default),11,12,13,14,15. Other integers in 2-15 are 400 UNSUPPORTED_VALUE.",
              "maxLength": 64,
              "pattern": "^[+-]?\\d+$",
              "type": "string"
            },
            "lon": {
              "description": "Longitude for op=encode.",
              "maxLength": 64,
              "pattern": "^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][+-]?\\d+)?$",
              "type": "string"
            },
            "op": {
              "default": "encode",
              "description": "encode (default), decode, shorten or recover.",
              "enum": [
                "encode",
                "decode",
                "shorten",
                "recover"
              ],
              "maxLength": 64,
              "type": "string"
            },
            "ref_lat": {
              "description": "Reference latitude for op=shorten/recover.",
              "maxLength": 64,
              "pattern": "^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][+-]?\\d+)?$",
              "type": "string"
            },
            "ref_lon": {
              "description": "Reference longitude for op=shorten/recover.",
              "maxLength": 64,
              "pattern": "^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)([eE][+-]?\\d+)?$",
              "type": "string"
            }
          },
          "required": [],
          "type": "object"
        },
        "type": {
          "const": "http",
          "type": "string"
        }
      },
      "required": [
        "type",
        "method"
      ],
      "type": "object"
    },
    "output": {
      "properties": {
        "example": {
          "properties": {
            "data": {
              "properties": {
                "bbox": {
                  "properties": {
                    "max_lat": {
                      "type": "number"
                    },
                    "max_lon": {
                      "type": "number"
                    },
                    "min_lat": {
                      "type": "number"
                    },
                    "min_lon": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "min_lat",
                    "min_lon",
                    "max_lat",
                    "max_lon"
                  ],
                  "type": "object"
                },
                "center": {
                  "properties": {
                    "lat": {
                      "type": "number"
                    },
                    "lon": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "lat",
                    "lon"
                  ],
                  "type": "object"
                },
                "code": {
                  "type": "string"
                },
                "full_code": {
                  "type": "string"
                },
                "is_full": {
                  "type": "boolean"
                },
                "is_short": {
                  "type": "boolean"
                },
                "length": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "precision_m": {
                  "type": "number"
                },
                "reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "valid": {
                  "type": "boolean"
                }
              },
              "required": [
                "code",
                "length",
                "is_full",
                "is_short",
                "valid"
              ],
              "type": "object"
            },
            "meta": {
              "properties": {
                "computed_at": {
                  "description": "RFC 3339 UTC with milliseconds",
                  "type": "string"
                },
                "deterministic": {
                  "type": "boolean"
                },
                "disclaimer": {
                  "type": "string"
                },
                "price_usd": {
                  "type": "string"
                },
                "request_id": {
                  "type": "string"
                },
                "sources": {
                  "items": {
                    "required": [
                      "id",
                      "version",
                      "published"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              },
              "required": [
                "request_id",
                "computed_at",
                "price_usd",
                "deterministic",
                "disclaimer"
              ],
              "type": "object"
            },
            "ok": {
              "const": true
            },
            "route": {
              "const": "/v1/geo/pluscode"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "ok",
            "route",
            "version",
            "data",
            "meta"
          ],
          "type": "object"
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "input"
  ],
  "type": "object"
}