Skip to main content
POST
/
openport
cURL
curl --request POST \
  --url https://api.geekflare.com/openport \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "url": "https://example.com",
  "topPorts": 100,
  "portRanges": "80,443,1000-1010"
}
'
{
  "timestamp": 1763372588297,
  "apiStatus": "success",
  "apiCode": 200,
  "meta": {
    "url": "https://example.com",
    "test": {
      "id": "mxqx9v9y0742lap6altwdteqd28t23nq"
    },
    "topPorts": 100,
    "portRanges": "80,443,1000-1010"
  },
  "data": [
    123
  ]
}

Authorizations

x-api-key
string
header
required

API Key required for all endpoints

Body

application/json
url
string
required

The URL to be checked

Example:

"https://example.com"

topPorts
enum<number>

Scan only the top N ports (optional)

Available options:
50,
100,
500,
1000,
5000
Example:

100

portRanges
string

Custom port ranges to scan, e.g., "80,443,1000-1010"

Example:

"80,443,1000-1010"

Response

Open ports retrieved successfully

timestamp
number
required

Timestamp of the request in milliseconds

Example:

1763372588297

apiStatus
enum<string>
required

API status message

Available options:
success,
failure
Example:

"success"

apiCode
number
required

API status code

Example:

200

meta
object
required

Metadata about the request

data
number[]
required

List of open ports found