Api Endpoint

Punycode IDN Converter

Punycode converter: convert internationalised domain names between Unicode and ASCII punycode in either direction, label by label, and validate each label against IDNA2008: length, leading and trailing hyphens, the hyphen-hyphen rule at positions 3 and 4, disallowed code points and bidirectional rules. Returns both forms, the per-label breakdown and the first rule violated. Strict mode is IDNA2008 (UTS 46 non-transitional); it may reject names /v1/code/url displays.

Open interactive test console

Offering

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

Endpoint context

URL
https://api.duoleads.com/v1/code/idn
MIME type
application/json
First seen
2026-10-16T01:50:38.788Z
Last seen
Tags
punycode, idn, idna, domains, code

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
89 ms
Average latency
743 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": {
        "domain": {
          "type": "string",
          "description": "Domain name in Unicode or punycode form.",
          "maxLength": 512
        },
        "to": {
          "type": "string",
          "description": "ascii, unicode or both (default). Validated only: the response always carries both forms.",
          "enum": [
            "ascii",
            "unicode",
            "both"
          ],
          "maxLength": 64,
          "default": "both"
        },
        "strict": {
          "type": "string",
          "description": "true (default) applies IDNA2008 strictly; false uses UTS 46 transitional (IDNA2003-compatible) processing, which maps e.g. ß to ss; current browsers and /v1/code/url use non-transitional processing, so its output can differ from them.",
          "enum": [
            "true",
            "false"
          ],
          "maxLength": 64,
          "default": "true"
        }
      },
      "required": [
        "domain"
      ]
    }
  },
  "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": {
            "domain": {
              "description": "Domain name in Unicode or punycode form.",
              "maxLength": 512,
              "type": "string"
            },
            "strict": {
              "default": "true",
              "description": "true (default) applies IDNA2008 strictly; false uses UTS 46 transitional (IDNA2003-compatible) processing, which maps e.g. ß to ss; current browsers and /v1/code/url use non-transitional processing, so its output can differ from them.",
              "enum": [
                "true",
                "false"
              ],
              "maxLength": 64,
              "type": "string"
            },
            "to": {
              "default": "both",
              "description": "ascii, unicode or both (default). Validated only: the response always carries both forms.",
              "enum": [
                "ascii",
                "unicode",
                "both"
              ],
              "maxLength": 64,
              "type": "string"
            }
          },
          "required": [
            "domain"
          ],
          "type": "object"
        },
        "type": {
          "const": "http",
          "type": "string"
        }
      },
      "required": [
        "type",
        "method"
      ],
      "type": "object"
    },
    "output": {
      "properties": {
        "example": {
          "properties": {
            "data": {
              "properties": {
                "ascii": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "labels": {
                  "items": {
                    "properties": {
                      "ascii": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "index": {
                        "type": "integer"
                      },
                      "length": {
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "punycoded": {
                        "type": "boolean"
                      },
                      "reason": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "unicode": {
                        "type": "string"
                      },
                      "valid": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "index",
                      "unicode",
                      "ascii",
                      "length",
                      "punycoded",
                      "valid",
                      "reason"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "total_length": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "unicode": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "valid": {
                  "type": "boolean"
                }
              },
              "required": [
                "ascii",
                "unicode",
                "valid",
                "labels",
                "reason",
                "total_length"
              ],
              "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/code/idn"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "ok",
            "route",
            "version",
            "data",
            "meta"
          ],
          "type": "object"
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "input"
  ],
  "type": "object"
}