Geekflare API

Port Scanner API

Secure your infrastructure by scanning for open ports on any IP address or domain.Verify firewall rules and audit network accessibility with flexible scanning options.

99.9% UptimeNmap PoweredStealth Scan Mode
Response
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{
"timestamp": 1768929500000,
"apiStatus": "success",
"apiCode": 200,
"meta": {
"url": "geekflare.com",
"test": {
"id": "a1b2c3d4-5e6f-7890-abcd-ef1234567890"
}
},
"data": {
"openPorts": [
{
"port": 80,
"service": "http",
"state": "open"
},
{
"port": 443,
"service": "https",
"state": "open"
},
{
"port": 22,
"service": "ssh",
"state": "open"
}
],
"totalScanned": 100,
"openCount": 3,
"closedCount": 97
}
}
Trusted by 10,000+ developers

Ready-to-use code snippets

import requests

url = "https://api.geekflare.com/openport"
payload = {"url": "example.com", "topPorts": 100}
headers = {
    "x-api-key": "<api-key>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)
print(response.text)
OpenAPI 3.0Type SafeSSL Encrypted

Why Geekflare Port Scanner API

Custom Port Ranges

Define exactly what to check. The API supports flexible inputs, allowing you to scan single ports (22), lists (80, 443), or full ranges (8000-9000).

Top Ports Presets

Use the topPorts parameter to automatically scan the most common 50, 100, 500, 1000, or 5000 ports frequently used by services and malware.

Real-Time Status

We perform active TCP connections to verify the actual status of the port.

Simple, transparent pricing

Starter

$9/mo

5K Credits/mo
Scan ~2500 hosts
5 Requests per second

Growth

Most Popular

$49/mo

100K Credits/mo
Scan ~50K hosts
25 Requests per second

Business

$249/mo

1M Credits/mo
Scan ~500K hosts
50 Requests per second

Build more with Geekflare

Run TLS Scan

Test SSL/TLS certificate configuration like supported protocols, expiry, CN, SAN, etc.

Lookup DNS Records

Query all major DNS record types including A, AAAA, CNAME, MX, TXT, NS, SOA, and CAA in a single request.

Scrape Website

Extract HTML, Markdown, or JSON from dynamic web pages with automatic CAPTCHA solving.

Check Site Loadtime

Check how much time your site takes to load including DNS, Connect, TLS, and TTFB metrics.

Check Broken Links

Find dead internal and external links on a webpage.

Frequently Asked Questions

The legality varies by jurisdiction. You should only scan networks, domains, or IPs that you own or have explicit permission to audit. Unauthorized scanning can be considered a cyberattack.

The API attempts to establish a TCP connection to the specified ports on the target IP or hostname. It analyzes the response to determine if the port is open or closed.

If no parameters are provided, the API defaults to scanning the Top 100 most common ports.

To avoid being flagged by IDPS, ensure you are only scanning assets you have authorization for.

Ready to Scan Ports?

Get your API key in less than 30 seconds. 500 free credits.