# TLD & Public Suffix Info Lookup

> TLD & Public Suffix Info Lookup is a paid API for AI agents from 2s.io, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Returns structured TLD metadata and Public Suffix List analysis for a given TLD label or full domain, including registrable domain, suffix section, and IANA registry details.

## Facts

- Endpoint: GET https://2s.io/api/tld/info
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tld-public-suffix-info-lookup-ea466040
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_IvpglGvUCEXzsJhV9zj3I

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability tld-public-suffix-info-lookup-ea466040
```

Example prompt: What type of TLD is .co.uk, who manages it, and what would be the registrable domain for shop.example.co.uk?

## When to prefer this

Use this endpoint when you need authoritative TLD classification (country-code vs generic), IANA manager information, or need to decompose a full domain into its public suffix, registrable domain, and subdomain according to the Mozilla PSL — especially for domain validation, security checks, or cookie-scoping logic.

## Known failure modes

- Missing both tld and domain query params — validation error
- Invalid or unrecognized TLD not in IANA root zone — may return empty items or no match
- Supplying both tld and domain simultaneously (XOR constraint violated) — input error
- Network or upstream IANA/PSL data unavailability — service error
- Payment failure via x402 — 402 response before data is returned

## How this service works

TLD registry intelligence and public-suffix analysis. Mode 1 (tld=io): IANA root-zone metadata — type (generic / country-code / sponsored), managing organization, unicode form for IDN TLDs. Mode 2 (domain=shop.example.co.uk): full Public Suffix List algorithm — the effective public suffix (co.uk), the registrable domain (example.co.uk), the subdomain part, the matched PSL rule, and whether the suffix is ICANN (registry) or private (corporate, e.g. github.io / s3.amazonaws.com) — plus the root-zone metadata for its TLD. Correctly handles wildcard and exception rules and IDN/punycode input. Use for cookie scoping, per-registrant rate limiting, URL dedup, and abuse/phishing analysis. Data: IANA root zone + Mozilla PSL, refreshed weekly.

## Output

A JSON object with ok:true, the TLD's type (e.g. country-code or generic), its IANA manager, the matched PSL rule, the public suffix, the registrable domain, any subdomain, and source attribution from IANA and Mozilla PSL.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "tld": "com"
  }
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "properties": {
      "tld": {
       "type": "string",
       "description": "TLD label, with or without the dot (XOR with domain)."
      },
      "domain": {
       "type": "string",
       "description": "Full domain to analyze against the PSL (XOR with tld)."
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tld-public-suffix-info-lookup-ea466040/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
