# TCP Port Checker

> TCP Port Checker is a paid API for AI agents from api.strale.io, paid per call via x402, $0.054001/call, status unknown (last checked 2026-09-13).

Checks whether specified TCP ports are open or closed on a given host, returning status and latency for up to 20 ports.

## Facts

- Endpoint: GET https://api.strale.io/x402/port-check
- Price: $0.054001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-strale-io-f28d3d9f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YY9RIdKXb5rCeA-jZ_idH

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 api-strale-io-f28d3d9f
```

Example prompt: Can you check if ports 80, 443, 22, and 3306 are open on api.example.com, with a 3000ms timeout?

## When to prefer this

Use this endpoint when you need to quickly verify TCP port reachability on a remote host without setting up local tooling, especially in automated workflows, infrastructure monitoring, or firewall verification tasks. Ideal for checking up to 20 ports in a single call with configurable timeout.

## Known failure modes

- Host unreachable or invalid hostname returns error
- Requesting more than 20 ports exceeds scan limit
- Timeout too low causes false negatives for slow hosts
- Invalid port number format returns validation error
- Network-level blocks may cause incorrect closed status

## How this service works

Check if TCP ports are open on a host. Scans up to 20 ports with configurable timeout. Returns open/closed status with latency.

## Output

Returns a list of checked ports with open/closed status and measured latency in milliseconds for each port on the given host.

## Example request

```json
{
 "host": "google.com",
 "ports": "80,443,22",
 "timeout_ms": 5000
}
```

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "host"
     ],
     "properties": {
      "host": {
       "type": "string"
      },
      "ports": {
       "description": "Array of port numbers or comma-separated string"
      },
      "timeout_ms": {
       "type": "integer"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-strale-io-f28d3d9f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.strale.io](https://www.zero.xyz/host/api.strale.io/llms.txt)
