---
title: "POST /openport"
method: POST
path: "/openport"
tags: ["openport"]
---

# POST /openport

`POST /openport`

Scan a website for open ports

## Request body

- OpenPortDto
  - `url` string, required — The URL to be checked
  - `topPorts` 50 | 100 | 500 | 1000 | 5000 — Scan only the top N ports (optional)
  - `portRanges` string — Custom port ranges to scan, e.g., "80,443,1000-1010"

## Response `200`

Open ports retrieved successfully

- OpenPortResponseDto
  - `timestamp` number, required — Timestamp of the request in milliseconds
  - `apiStatus` 'success' | 'failure', required — API status message
  - `apiCode` number, required — API status code
  - `meta` OpenPortMetaDto, required
    - `url` string, required — The scanned URL
    - `topPorts` 50 | 100 | 500 | 1000 | 5000 — Top ports scanned (if any)
    - `portRanges` string — Custom port ranges scanned (if any)
    - `test` TestMetaDto, required
      - `id` string, required — Unique test identifier
  - `data` number[], required — List of open ports found

## Other responses

- `400` — Bad request (invalid parameters)
- `500` — Internal server error

---

[API](https://skmtc.net/geekflare/apis/geekflare-api.md) · [All operations](https://skmtc.net/geekflare/apis/geekflare-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/geekflare/geekflare-api/versions/936993afc936/schema)
