Network

Port Scan

0calls
1 credits / call

Want to check if a certain port on your server (such as SSH's port 22 or Web's port 80) is open to the outside world? This tool can help you quickly confirm.

GET
uapis.cn
/api/v1/network/portscan
Query parameters
3
host
string
required

The target host to scan, which can be a domain name or IP address.

port
integer
required

The port number to scan, ranging from 1 to 65535.

protocol
string

The protocol used for scanning, can be 'tcp' or 'udp'.

Overview

You can specify a host and port number, our server will try to connect to that port and tell you whether it is open, closed or timed out. This is useful for network service configuration checks and basic security scanning.

Query parameters

host
stringrequired

The target host to scan, which can be a domain name or IP address.

port
integerrequired

The port number to scan, ranging from 1 to 65535.

protocol
stringoptional

The protocol used for scanning, can be 'tcp' or 'udp'.

Response

200 / OK

Scan completed! Returns the status of the port.

JSON
{
  "ip": "1.2.3.4",
  "port": 80,
  // "open", "closed", or "timeout"
  "port_status": "open",
  "protocol": "tcp"
}

400 / Bad Request

Invalid request parameters. Please check if host, port and other parameters are provided and formatted correctly.

JSON
{
  "code": "INVALID_ARGUMENT",
  "details": {},
  "message": "Invalid parameters provided (e.g., port out of range)."
}

500 / Internal Server Error

Scan failed. An internal error occurred while the server was performing the scan.

JSON
{
  "code": "SCAN_FAILED",
  "details": {},
  "message": "The port scan operation failed."
}