Need port data in your app, script, or security tool? The PortLookup API gives you programmatic access to our database of 8,000+ TCP/UDP port records, the same data powering this site, available via a simple REST call.
No scraping. No parsing HTML. Just clean JSON.
What You Can Build
- Network monitoring dashboards that enrich port data with service names and security context
- Security scanners that identify what’s running on open ports
- Firewall management tools that validate port configurations
- IT asset management systems that document services by port
- Home lab automation scripts that cross-reference open ports with known services
What the API Returns
Every port record includes the primary service identifier, protocol (TCP/UDP/SCTP), official IANA assignment status, and known applications using that port. Higher-tier plans unlock full service
lists, descriptions, and direct links to the reference page. Try It Now
A simple curl request is all it takes:
curl --request GET \
--url 'https://portlookup.p.rapidapi.com/port/443' \
--header 'X-RapidAPI-Key: YOUR_API_KEY' \
--header 'X-RapidAPI-Host: portlookup.p.rapidapi.com'Response:
{
"port_number": 443,
"primary_service": "https",
"protocol": "tcp, udp",
"official": true,
"categories": "Assigned",
"services": "https, OpenVPN, SSTP, Minecraft Java Edition",
"descriptions": "Secure HTTP traffic encrypted via TLS/SSL",
"reference_url": "https://portlookup.com/port-443/"
}Endpoints
GET /port/{port}
Look up a specific port number. Returns service name, protocol, category, and more depending on your plan.
Example: /port/22
returns SSH details, security category, and all known services using port 22.
GET /search?q={query}
Search by service name, application, or keyword. Find which ports a specific protocol or application uses.
Example: /search?q=openvpn
returns all ports associated with OpenVPN.
GET /ping
Health check endpoint. Returns API status and server timestamp
Use this to monitor uptime in your infrastructure.
Plans
| BASIC | PRO | ULTRA | MEGA | |
|---|---|---|---|---|
| Price | Free | $9.99/mo | $24.99/mo | $49.99/mo |
| Requests/month | 100 | 1,000 | 25,000 | 100,000 |
| Port number | ✓ | ✓ | ✓ | ✓ |
| Primary service | ✓ | ✓ | ✓ | ✓ |
| Protocol | ✓ | ✓ | ✓ | ✓ |
| Official status | ✗ | ✓ | ✓ | ✓ |
| Categories | ✗ | ✓ | ✓ | ✓ |
| All services | ✗ | ✗ | ✓ | ✓ |
| Descriptions | ✗ | ✗ | ✓ | ✓ |
| Reference URL | ✗ | ✗ | ✗ | ✓ |
| More Info | More Info | More Info | More Info |
Code Examples
Python
import requests
url = "https://portlookup.p.rapidapi.com/port/22"
headers = {
"X-RapidAPI-Key": "YOUR_API_KEY",
"X-RapidAPI-Host": "portlookup.p.rapidapi.com"
}
response = requests.get(url, headers=headers)
print(response.json())JavaScript (fetch)
const response = await fetch(
'https://portlookup.p.rapidapi.com/port/22',
{
headers: {
'X-RapidAPI-Key': 'YOUR_API_KEY',
'X-RapidAPI-Host': 'portlookup.p.rapidapi.com'
}
}
);
const data = await response.json();
console.log(data);Node.js (axios)
const axios = require('axios');
const options = {
method: 'GET',
url: 'https://portlookup.p.rapidapi.com/port/22',
headers: {
'X-RapidAPI-Key': 'YOUR_API_KEY',
'X-RapidAPI-Host': 'portlookup.p.rapidapi.com'
}
};
const { data } = await axios.request(options);
console.log(data);PHP
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://portlookup.p.rapidapi.com/port/22',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-RapidAPI-Key: YOUR_API_KEY',
'X-RapidAPI-Host: portlookup.p.rapidapi.com'
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;Data Coverage
The database covers the full TCP/UDP port range from 0 to 65535, including:
- Well-known ports (0-1023) — HTTP, HTTPS, SSH, FTP, DNS, SMTP and all other IANA-assigned standard services
- Registered ports (1024-49151) — Application-specific ports registered with IANA including databases, game servers, and enterprise software
- Dynamic ports (49152-65535) — Common usage patterns and known applications in the ephemeral range
Data is sourced from IANA, Wikipedia, and community submissions, updated continuously.
FAQ
Is there a free tier?
Yes. The BASIC plan gives you 100 requests per month at no cost, enough to evaluate the API and build a proof of concept.
What happens if I exceed my monthly limit?
On BASIC, requests are blocked until the next billing cycle. On paid plans, overages are billed per request at your plan rate.
How fresh is the data?
The database is updated continuously via community submissions and periodic IANA sync.
Do you offer enterprise or custom plans?
Yes. If you need higher volumes or custom data fields, contact us directly.