# Port API

## Check port status

> Returns the status of specified ports or all ports if 'ports=all' is provided.

```json
{"openapi":"3.1.1","info":{"title":"Port API","version":"1.0"},"paths":{"/api/port_check":{"get":{"summary":"Check port status","description":"Returns the status of specified ports or all ports if 'ports=all' is provided.","parameters":[{"schema":{"type":"string"},"name":"t","in":"query","description":"Response type 1=txt, 2=json"},{"schema":{"type":"string"},"name":"ports","in":"query","description":"Specify a port number or use 'all' to check all ports."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseCheckStatus"}}}}}}}},"components":{"schemas":{"ResponseCheckStatus":{"type":"object","description":"API response format.","properties":{"error":{"type":"boolean","description":"Error status (true if an error occurred, false if successful)."},"message":{"type":"string","description":"Response message."},"data":{"type":"array","items":{"$ref":"#/components/schemas/PortStats"},"description":"List of port status details."}}},"PortStats":{"type":"object","description":"Details of a port's status.","properties":{"port":{"type":"integer","description":"The port number being checked."},"online":{"type":"boolean","description":"Indicates whether the port is online (true) or offline (false)."}}}}}}
```

## Get port status

> Returns the status of ports, including their address, city, public IP, and online status.

```json
{"openapi":"3.1.1","info":{"title":"Port API","version":"1.0"},"paths":{"/api/port_status":{"get":{"summary":"Get port status","description":"Returns the status of ports, including their address, city, public IP, and online status.","parameters":[{"schema":{"type":"string"},"name":"t","in":"query","description":"Response type 1=txt, 2=json"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsePortStatus"}}}}}}}},"components":{"schemas":{"ResponsePortStatus":{"type":"object","description":"API response format.","properties":{"error":{"type":"boolean","description":"Error status (true if an error occurred, false if successful)."},"message":{"type":"string","description":"Response message."},"data":{"type":"array","items":{"$ref":"#/components/schemas/PortInfo"},"description":"List of port status details."}}},"PortInfo":{"type":"object","description":"Details of a port's status.","properties":{"address":{"type":"string","description":"The address associated with the port."},"city":{"type":"string","description":"The city where the port is located."},"public_ip":{"type":"string","description":"The public IP address of the port."},"online":{"type":"boolean","description":"Indicates whether the port is online (true) or offline (false)."}}}}}}
```

## Set port range

> Configures a range of ports starting from a specified port.

```json
{"openapi":"3.1.1","info":{"title":"Port API","version":"1.0"},"paths":{"/api/set_port_range":{"get":{"summary":"Set port range","description":"Configures a range of ports starting from a specified port.","parameters":[{"schema":{"type":"string"},"name":"start_port","in":"query","description":"The starting port of the range."},{"schema":{"type":"string"},"name":"port_num","in":"query","description":"The number of ports in the range."},{"schema":{"type":"string"},"name":"t","in":"query","description":"Response type 1=txt, 2=json"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}},"406":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}}}}}},"components":{"schemas":{"ResponseMessage":{"type":"object","description":"API response format.","properties":{"error":{"type":"boolean","description":"Error status (true if an error occurred, false if successful)."},"message":{"type":"string","description":"Response message."}}}}}}
```

## Check free ports

> Returns the status of requested ports.

```json
{"openapi":"3.1.1","info":{"title":"Port API","version":"1.0"},"paths":{"/api/port_free":{"get":{"summary":"Check free ports","description":"Returns the status of requested ports.","parameters":[{"schema":{"type":"string"},"name":"ports","in":"query","description":"List of ports to check, separated by commas."},{"schema":{"type":"string"},"name":"t","in":"query","description":"Response type 1=txt, 2=json"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseMessage"}}}}}}}},"components":{"schemas":{"ResponseMessage":{"type":"object","description":"API response format.","properties":{"error":{"type":"boolean","description":"Error status (true if an error occurred, false if successful)."},"message":{"type":"string","description":"Response message."}}}}}}
```

## The ProxyInfo object

```json
{"openapi":"3.1.1","info":{"title":"Port API","version":"1.0"},"components":{"schemas":{"ProxyInfo":{"type":"object","description":"Details of an available proxy.","properties":{"id":{"type":"string","description":"Unique identifier of the proxy."},"city":{"type":"string","description":"City where the proxy is located."},"ip":{"type":"string","description":"IP address of the proxy."},"country_code":{"type":"string","description":"Country code of the proxy location."},"is_online":{"type":"boolean","description":"Indicates whether the proxy is online (true) or offline (false)."},"binding":{"type":["string","null"],"description":"Binding information, if applicable."}}}}}}
```

## The ResponseTodayList object

```json
{"openapi":"3.1.1","info":{"title":"Port API","version":"1.0"},"components":{"schemas":{"ResponseTodayList":{"type":"object","description":"API response format.","properties":{"error":{"type":"boolean","description":"Error status (true if an error occurred, false if successful)."},"message":{"type":"string","description":"Response message."},"data":{"type":"array","items":{"$ref":"#/components/schemas/ProxyInfo"},"description":"List of proxies available today."}}},"ProxyInfo":{"type":"object","description":"Details of an available proxy.","properties":{"id":{"type":"string","description":"Unique identifier of the proxy."},"city":{"type":"string","description":"City where the proxy is located."},"ip":{"type":"string","description":"IP address of the proxy."},"country_code":{"type":"string","description":"Country code of the proxy location."},"is_online":{"type":"boolean","description":"Indicates whether the proxy is online (true) or offline (false)."},"binding":{"type":["string","null"],"description":"Binding information, if applicable."}}}}}}
```

## The PortStats object

```json
{"openapi":"3.1.1","info":{"title":"Port API","version":"1.0"},"components":{"schemas":{"PortStats":{"type":"object","description":"Details of a port's status.","properties":{"port":{"type":"integer","description":"The port number being checked."},"online":{"type":"boolean","description":"Indicates whether the port is online (true) or offline (false)."}}}}}}
```

## The ResponseCheckStatus object

```json
{"openapi":"3.1.1","info":{"title":"Port API","version":"1.0"},"components":{"schemas":{"ResponseCheckStatus":{"type":"object","description":"API response format.","properties":{"error":{"type":"boolean","description":"Error status (true if an error occurred, false if successful)."},"message":{"type":"string","description":"Response message."},"data":{"type":"array","items":{"$ref":"#/components/schemas/PortStats"},"description":"List of port status details."}}},"PortStats":{"type":"object","description":"Details of a port's status.","properties":{"port":{"type":"integer","description":"The port number being checked."},"online":{"type":"boolean","description":"Indicates whether the port is online (true) or offline (false)."}}}}}}
```

## The PortInfo object

```json
{"openapi":"3.1.1","info":{"title":"Port API","version":"1.0"},"components":{"schemas":{"PortInfo":{"type":"object","description":"Details of a port's status.","properties":{"address":{"type":"string","description":"The address associated with the port."},"city":{"type":"string","description":"The city where the port is located."},"public_ip":{"type":"string","description":"The public IP address of the port."},"online":{"type":"boolean","description":"Indicates whether the port is online (true) or offline (false)."}}}}}}
```

## The ResponsePortStatus object

```json
{"openapi":"3.1.1","info":{"title":"Port API","version":"1.0"},"components":{"schemas":{"ResponsePortStatus":{"type":"object","description":"API response format.","properties":{"error":{"type":"boolean","description":"Error status (true if an error occurred, false if successful)."},"message":{"type":"string","description":"Response message."},"data":{"type":"array","items":{"$ref":"#/components/schemas/PortInfo"},"description":"List of port status details."}}},"PortInfo":{"type":"object","description":"Details of a port's status.","properties":{"address":{"type":"string","description":"The address associated with the port."},"city":{"type":"string","description":"The city where the port is located."},"public_ip":{"type":"string","description":"The public IP address of the port."},"online":{"type":"boolean","description":"Indicates whether the port is online (true) or offline (false)."}}}}}}
```

## The ResponseMessage object

```json
{"openapi":"3.1.1","info":{"title":"Port API","version":"1.0"},"components":{"schemas":{"ResponseMessage":{"type":"object","description":"API response format.","properties":{"error":{"type":"boolean","description":"Error status (true if an error occurred, false if successful)."},"message":{"type":"string","description":"Response message."}}}}}}
```

## The ResponseBase object

```json
{"openapi":"3.1.1","info":{"title":"Port API","version":"1.0"},"components":{"schemas":{"ResponseBase":{"type":"object","description":"API response format.","properties":{"error":{"type":"boolean","description":"Error status (true if an error occurred, false if successful)."},"message":{"type":"string","description":"Response message."},"data":{"type":"array","items":{"type":"string"},"description":"List of returned proxies."}}}}}}
```
