API Reference

v1.0.0

The BarkScan API provides programmatic access to internet-wide scanning data, banner grabbing results, DNS records, and protocol analysis. All endpoints return JSON.

Base URL
https://barkscan.com/api/v1

Authentication

All API requests require authentication. You can authenticate using either a Bearer token header (recommended) or a query parameter.

API keys are managed from your account settings.

Bearer Token (Recommended)

Include your API key in the Authorization header.

Authorization: Bearer bsk_live_abc123...

Query Parameter

Append your API key as a query parameter.

GET /api/v1/search?api_key=bsk_live_abc123...

Code Examples

curl -H "Authorization: Bearer YOUR_API_KEY" \
https://barkscan.com/api/v1/search?q=nginx
Used for "Try it" requests below

Rate Limiting

API requests are subject to rate limiting. When rate-limited, you will receive a 429 Too Many Requests response. Monitor your usage with the following response headers:

HeaderDescription
X-RateLimit-LimitMaximum requests allowed per window
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetUTC epoch timestamp when the window resets

Errors

The API uses standard HTTP status codes. All error responses include a JSON object with an error field containing a human-readable message.

CodeMeaning
200Success
400Bad Request -- invalid parameters
401Unauthorized -- missing or invalid API key
404Not Found -- resource does not exist
429Too Many Requests -- rate limit exceeded
500Internal Server Error
{
"error": "Missing API key. Use Authorization: Bearer <key> header or ?api_key= parameter."
}
GET/search

Search across all banner grabbing results with flexible filtering. Supports a smart query parameter that auto-detects the query type (IP address, port number, CIDR range, etc.), as well as explicit filter parameters.

Parameters

NameTypeRequiredDescription
qstringNoSmart query string. Auto-detects: IP, port, CIDR range, or banner text.
ipstringNoFilter by exact IP address.
portintegerNoFilter by port number (1-65535).
statusstringNoFilter by result status (e.g. SUCCESS, TIMEOUT, REFUSED).
protocolstringNoFilter by detected protocol:ssh,http,tls
bannerstringNoSubstring search within banner text (case-insensitive).
start_datedatetimeNoOnly include results grabbed at or after this datetime (ISO 8601).
end_datedatetimeNoOnly include results grabbed at or before this datetime (ISO 8601).
pageintegerNoPage number (default: 1).
per_pageintegerNoResults per page, max 100 (default: 25).

Response

{
"data": [
{
"id": 918274650,
"ip": "203.0.113.1",
"port": 443,
"status": "SUCCESS",
"banner": "HTTP/1.1 200 OK\r\nServer: nginx/1.24.0\r\n...",
"protocol_details": {
"tls": { "version": "TLSv1.3", "cipher": "TLS_AES_256_GCM_SHA384" },
"http": { "status_code": 200, "server": "nginx/1.24.0" }
},
"grabbed_at": "2026-02-20T14:30:00Z"
}
],
"meta": { "total": 1542, "page": 1, "per_page": 25 }
}

Example Request

curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://barkscan.com/api/v1/search?q=203.0.113.1&port=443&protocol=tls"
Try it
GET/host/{ip}

Retrieve all recent banner grabbing results for a specific IP address, ordered by most recent first.

Parameters

NameTypeRequiredDescription
ipstringRequiredIPv4 or IPv6 address (path parameter).
pageintegerNoPage number (default: 1).
per_pageintegerNoResults per page, max 100 (default: 25).

Response

{
"data": [
{
"id": 918274650,
"ip": "198.51.100.42",
"port": 22,
"status": "SUCCESS",
"banner": "SSH-2.0-OpenSSH_9.6",
"protocol_details": {
"ssh": {
"server_software": "OpenSSH_9.6",
"kex_algorithms": ["curve25519-sha256", "diffie-hellman-group16-sha512"],
"host_key_algorithms": ["ssh-ed25519", "rsa-sha2-512"]
}
},
"grabbed_at": "2026-02-21T08:15:30Z"
}
],
"meta": { "total": 2, "page": 1, "per_page": 25 }
}

Example Request

curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://barkscan.com/api/v1/host/198.51.100.42"
Try it
GET/host/{ip}/ports

Retrieve a sorted list of distinct port numbers observed for a specific IP address.

Parameters

NameTypeRequiredDescription
ipstringRequiredIPv4 or IPv6 address (path parameter).

Response

{
"data": [22, 80, 443, 3306, 8080],
"meta": {}
}

Example Request

curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://barkscan.com/api/v1/host/198.51.100.42/ports"
Try it
GET/dns/{domain}

Retrieve DNS records for a specific domain, ordered by most recently updated first. Supports pagination.

Parameters

NameTypeRequiredDescription
domainstringRequiredDomain name to look up (path parameter).
pageintegerNoPage number (default: 1).
per_pageintegerNoResults per page, max 100 (default: 25).

Response

{
"data": [
{
"id": 47291830,
"domain": "example.com",
"tld": "com",
"ip": ["93.184.216.34"],
"created_at": "2025-06-15T10:00:00Z",
"updated_at": "2026-02-20T12:30:00Z"
}
],
"meta": { "total": 1, "page": 1, "per_page": 25 }
}

Example Request

curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://barkscan.com/api/v1/dns/example.com"
Try it
GET/dns/reverse/{ip}

Find domains that resolve to a given IP address. Returns up to 100 matching DNS records, ordered by most recently updated first.

Parameters

NameTypeRequiredDescription
ipstringRequiredIPv4 address to look up (path parameter).

Response

{
"data": [
{
"id": 47291830,
"domain": "example.com",
"tld": "com",
"ip": ["93.184.216.34"],
"created_at": "2025-06-15T10:00:00Z",
"updated_at": "2026-02-20T12:30:00Z"
},
{
"id": 47291831,
"domain": "www.example.com",
"tld": "com",
"ip": ["93.184.216.34"],
"created_at": "2025-06-15T10:00:00Z",
"updated_at": "2026-02-20T12:30:00Z"
}
],
"meta": {}
}

Example Request

curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://barkscan.com/api/v1/dns/reverse/93.184.216.34"
Try it
GET/stats/ports

Returns the count of banner results grouped by port number, sorted by count descending. By default, covers the last 24 hours.

Parameters

NameTypeRequiredDescription
sincedatetimeNoOnly count results grabbed at or after this datetime (ISO 8601). Defaults to 24 hours ago.

Response

{
"data": [
{ "port": 80, "count": 1842503 },
{ "port": 443, "count": 1623871 },
{ "port": 22, "count": 987432 },
{ "port": 3306, "count": 234187 },
{ "port": 8080, "count": 198432 }
],
"meta": {}
}

Example Request

curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://barkscan.com/api/v1/stats/ports?since=2026-02-20T00:00:00Z"
Try it
GET/stats/protocols

Returns the count of banner results by detected protocol (SSH, HTTP, TLS). By default, covers the last 24 hours.

Parameters

NameTypeRequiredDescription
sincedatetimeNoOnly count results grabbed at or after this datetime (ISO 8601). Defaults to 24 hours ago.

Response

{
"data": {
"ssh": 987432,
"http": 1842503,
"tls": 1623871
},
"meta": {}
}

Example Request

curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://barkscan.com/api/v1/stats/protocols"
Try it
GET/account

Returns information about the authenticated user and the API key used for the request.

Parameters

This endpoint has no additional parameters beyond authentication.

Response

{
"data": {
"email": "[email protected]",
"admin": false,
"api_key": {
"name": "Production Key",
"created_at": "2025-11-01T09:00:00Z",
"last_used_at": "2026-02-22T10:15:30Z"
},
"active_api_keys": 2
},
"meta": {}
}

Example Request

curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://barkscan.com/api/v1/account"
Try it

No parameters required. Uses your API key for authentication.

OpenAPI Specification

Download the full OpenAPI 3.0 specification for use with code generators, Postman, or other API tools.

Download openapi/v1.yaml

Ready to get started?

Create a free account and generate your API key in seconds.