# TCP Port Scanner by _done

> TCP Port Scanner by _done is a paid API for AI agents from port-scanner.underscoredone.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-11).

Scans a hostname or IP address to identify open TCP ports, running services, and software versions across a specified port range

## Facts

- Endpoint: POST https://port-scanner.underscoredone.com/scan?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tcp-port-scanner-by-done-4dc0e101
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NEt5pksTo7LTL_1Yrwl1w

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 tcp-port-scanner-by-done-4dc0e101 -d '<json body>'
```

Example prompt: Can you scan my server at 192.168.1.100 and check ports 1 through 1000 to tell me which ones are open, what services are running, and what software versions you detect — give it up to 30 seconds to complete?

## When to prefer this

Use this endpoint when you need to programmatically discover open TCP ports and running services on a host without installing nmap or other local network tools. Prefer it over raw socket code when you want structured JSON output including service names and version strings. Best for infrastructure audits, firewall verification, and service discovery on hosts you own or have permission to scan.

## Known failure modes

- Target host unreachable or invalid — scan may complete with zero open ports or return an error
- Timeout exceeded if host is slow to respond and timeout value is too low
- Invalid port range or malformed port specification causes request rejection
- Permission denied or blocked by the scanned host's firewall returns ports as closed/filtered rather than open
- Scan of non-owned hosts may violate terms of service; API does not enforce authorization

## How this service works

Give this API a hostname or IP address and it tries connecting to each port in your requested range. For every port that answers it reports whether it is open or blocked, which service is likely running there (a web server, SSH), and what software version was detected. Saves you installing network tools, parsing command-line output, or writing socket loops. Only scan hosts you own or have permission to scan - this tool does not check that for you.

## Output

Returns a JSON object listing every open port found, including port number, state (open), protocol (tcp), likely service name (e.g. ssh, http), and detected software version (e.g. OpenSSH 8.2p1). Also includes metadata: resolved IP address, total ports scanned, closed/filtered count, scan duration in milliseconds, scan type, and a completion flag.

## Example request

```json
{
 "ports": "80,443",
 "target": "example.com",
 "timeout": 10,
 "scan_type": "tcp_connect"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "ports": {
   "type": "string",
   "description": "Which ports to check. Use a range like '1-1000', a comma-separated list like '22,80,443', or leave this out to automatically check the 1000 most commonly used ports."
  },
  "target": {
   "type": "string",
   "description": "The hostname (like 'example.com') or numeric IP address (like '93.184.216.34') you want to scan. Must be a real, reachable address."
  },
  "timeout": {
   "type": "integer",
   "description": "How many seconds the scan is allowed to run before giving up. Must be between 5 and 60. Defaults to 30 if left out."
  },
  "scan_type": {
   "type": "string",
   "description": "How to probe each port. The only supported value right now is 'tcp_connect', which tries to open a full connection - the same way a browser or app would. Defaults to 'tcp_connect' if left out."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "target": "scanme.nmap.org",
  "warning": "",
  "complete": true,
  "scan_type": "tcp_connect",
  "open_ports": [
   {
    "port": 22,
    "state": "open",
    "service": "ssh",
    "version": "OpenSSH 8.2p1",
    "protocol": "tcp"
   },
   {
    "port": 80,
    "state": "open",
    "service": "http",
    "version": "Apache httpd 2.4.41",
    "protocol": "tcp"
   }
  ],
  "api_version": "1.0.0",
  "duration_ms": 4521,
  "resolved_ip": "45.33.32.156",
  "ports_scanned": 1000,
  "ports_requested": 1000,
  "closed_or_filtered_count": 998
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tcp-port-scanner-by-done-4dc0e101/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from port-scanner.underscoredone.com](https://www.zero.xyz/host/port-scanner.underscoredone.com/llms.txt)
