# Dev Reference: TCP/UDP Port Lookup

> Dev Reference: TCP/UDP Port Lookup is a paid API for AI agents from dev-reference.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-30).

Returns the IANA service name, common use description, supported protocols, and port range class for any TCP/UDP port number (0–65535)

## Facts

- Endpoint: GET https://dev-reference.x402tookit.com/port-lookup?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/dev-reference-tcp-udp-port-lookup-da0a2c02
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zILBnJrk0uRTM2HIBwgQt

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 dev-reference-tcp-udp-port-lookup-da0a2c02
```

Example prompt: What IANA service is registered on port 5432, what is it commonly used for, and what port range class does it fall into?

## When to prefer this

Choose this endpoint when you need authoritative IANA port assignments and common-use descriptions for well-known ports (roughly the top 130), including whether official and de-facto usage differ. It is purpose-built for developer reference and security tooling, returning structured metadata with range classification, protocols, and verdict reasoning — making it more useful than a plain text lookup when you need machine-readable output for downstream logic.

## Known failure modes

- Port number out of range (not 0–65535) returns a validation error
- Port not in the ~130 well-known port dataset may return null or sparse fields with degraded=true
- Network timeout or upstream unavailability returns a service error
- Missing required 'port' query parameter returns a 400-level error

## How this service works

IANA service name and common use for a TCP/UDP port (about 130 well-known ports), plus the port range class.

## Output

Returns a structured object including: the port number, IANA-registered service name(s), IANA description, common real-world use, supported protocols (TCP/UDP), port range class (well-known 0–1023, registered 1024–49151, or dynamic/private 49152–65535), whether the port is IANA-assigned, a verdict and reasons, and a flag indicating if official and common use differ. May include a degraded flag and disclaimer if data is partial.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "port"
     ],
     "properties": {
      "port": {
       "type": "integer",
       "description": "Port number, 0 to 65535"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "port": {
       "type": [
        "null",
        "number"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "ianaRows": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "object",
        "properties": {
         "service": {
          "type": [
           "null",
           "string"
          ]
         },
         "protocol": {
          "type": [
           "null",
           "string"
          ]
         },
         "description": {
          "type": [
           "null",
           "string"
          ]
         }
        }
       }
      },
      "commonUse": {
       "type": [
        "null",
        "string"
       ]
      },
      "protocols": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "rangeClass": {
       "type": [
        "null",
        
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/dev-reference-tcp-udp-port-lookup-da0a2c02/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from dev-reference.x402tookit.com](https://www.zero.xyz/host/dev-reference.x402tookit.com/llms.txt)
