ONYPHE Discovery API
Bulk OQL over an asset inventory, category in the URL.
Bulk OQL over an asset inventory, category in the URL.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/onyphe:onyphe-discovery-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: ONYPHE API - Search, Export, and ASD Pivot Query Discovery…
version: '2026-10-21'
description: 'Developer reference for four ONYPHE endpoints: **Search**, **Export**,
**Discovery** (bulk) and **ASD Pivot Query**. Queries are written in OQL
(ONYPHE Query Language), always `FILTER:VALUE`. ## Two use cases, two data models
The `category` you query decides which **field names** you must use. A field from the wrong model **returns 0 results (or HTTP 400) and never
an explicit "unknown field" error**, which is indistinguishable from a
genuine absence. Pick the model first. ### A. IP enrichment and CTI: `ctiscan` and `ctiurl` (ctiscan data model)
- `ctiscan` is service-level: one document per scanned service, merging
every scanning step (IP, TCP, application, TLS/certificate, component,
DNS, HTTP, favicon, hashes...) so a single document carries every pivot. - `ctiurl` is URL-level and uses the same model; `http.url` is what
distinguishes it. - Fields are organised in *layers* (`ip.*`, `tcp.*`, `app.*`, `http.*`,
`cert.*`, `component.*`, `dns.*`, `html.*`, ...). - The raw response is `app.data.text` (up to ~1 MB). - Use it to enrich an IP (`ip.dest:1.2.3.4`), hunt infrastructure, and pivot
on certificates, hashes and fingerprints. - The Summary API never returns ctiscan/ctiurl; query them here. ### B. Attack surface management (ASM): `riskscan` and `vulnscan` (datascan data model)
- `datascan`, `vulnscan` and `riskscan` share one flat, datascan-style model
(`ip`, `port`, `protocol`, `hostname`, `domain`, `tag`, `cve`, `cpe`,
`seen_date`, `data`...). - `riskscan`: services matching a CTI-informed risk baseline, carrying
`risk::*` tags (exposed database, critical CVE, sensitive protocol,
compromised device...) and the positive CVE detections. About **7 months**
of history. Positive-only: it has no "not vulnerable" verdicts. Its raw
`data` is truncated after a period of time. - `vulnscan`: CVE detection by *check-based* (`vulnerable`, `notvulnerable`,
`maybevulnerable`, `unknownvulnerable`) and *version-based*
(`vulnerableversion`, `notvulnerableversion`, `maybevulnerableversion`,
`partialversion`, `unknownversion`, `version`) detection. Holds negative
verdicts, the full stored response and deeper history. Always add
`-exists:cve` when you want only records that carry a CVE. - Typical entry point is the **Discovery** endpoint, fed with an asset
inventory (one OQL line per domain/IP). ### Field dialect cheat-sheet
| Meaning | datascan / vulnscan / riskscan | ctiscan / ctiurl |
|---|---|---|
| IP | `ip` | `ip.dest` |
| Port | `port` | `tcp.dest` (this service), `services.port` (any open port on the host) |
| Protocol | `protocol` | `app.protocol` |
| Raw response | `data` (capped at 16384 bytes) | `app.data.text` (up to ~1 MB) |
| CPE | `cpe` | `component.cpe` |
| Product / vendor / version | `product`, `productvendor`, `productversion` | `component.product`, `component.vendor`, `component.version` |
| HTTP status | `status` | `http.code` |
| URL | `url` | `http.url` |
| Page title | `app.http.title` | `html.title.text` (full-text), `html.title.raw` (exact/regexp) |
| Device class | `device.class` | `app.device` |
| Reverse / forward DNS | `reverse` / `forward` | `dns.reverse.hostname` / `dns.forward.hostname` |
| ASN / organisation / country | `asn`, `organization`, `country` | `ip.asn`, `ip.organization`, `ip.country` |
| Cert subject CN / issuer org | `subject.commonname`, `issuer.organization` | `cert.subject.cn`, `cert.issuer.o` |
| Cert SHA-256 | `fingerprint.sha256` | `cert.fingerprint.sha256` |
Unchanged in both models: `tag`, `source`, `@category`, `@timestamp`,
`seen_date`. ## OQL notes
Plain filters are `FILTER:VALUE`. OR is `?`, NOT is `!`; there is no
`OR`/`NOT` keyword: `( ?domain:a.com ?domain:b.com )`, `!domain:google.com`. **Functions** are server-side, prefixed with `-`, written on the query
side (before any `|` post-processing). Every function has a short alias. They are licence-gated: one your subscription does not grant is refused
(`400 unknown function`), not ignored.'
contact:
name: ONYPHE
url: https://www.onyphe.io
license:
name: BSD-3-Clause
url: https://opensource.org/license/bsd-3-clause
servers:
- url: https://www.onyphe.io/api/v2
description: v2 API (Search, Export, Discovery). ASD overrides this per operation.
security:
- bearerAuth: []
tags:
- name: Discovery
description: Bulk OQL over an asset inventory, category in the URL.
paths:
/bulk/discovery/{category}/asset:
post:
tags:
- Discovery
operationId: bulkDiscovery
summary: Run OQL over an asset inventory, category in the URL
description: 'Takes a text body with **one OQL line per line** (typically an asset
inventory: `domain:"example.com"`, `ip:"198.51.100.7"`...) and returns
NDJSON for the chosen category. Each line becomes
`category: `; any `-` options you need must be part of
the line. **Griffin View only.**
**Validate the inventory before sending; no line is ever rejected:**
- Blank lines are ignored.
- **Lines are not interpreted as comments.** A line such as `# my assets`
runs as a full-text query (`category: # my assets`) and
returns unrelated documents. Strip comment lines client-side.
- A syntactically invalid line (e.g. an unterminated quote) returns no
results, so check quoting before sending.
- A bare value is expanded server-side. `example.com` becomes
`?onion: ?hostname: ?domain: ?subdomains:` plus `-orwildcard` on
`hostname`, `domain` and `subdomains`, which is much broader than
`domain:"example.com"`. A bare IP becomes `ip:`.
While the server batches work it may emit **keepalive lines**,
`{"@category":"none","keepalive":"true","data":"running next batch"}`.
Skip them; a stream made only of keepalive lines means no results.
Treat the response body as NDJSON.
**ASM (primary use)**: `category=riskscan` or `category=vulnscan`, datascan
field model. Examples of a line: `domain:"example.com" tag:risk::exposeddatabase
-since:3M -fields:ip,port,hostname,tag,seen_date`.
- On `riskscan`, without `-since:` the latest state per asset is
returned; with `-since:d|M`, **every scan in the window** is
returned. Other categories (e.g. `datascan`) return every scan in the
default 30-day window either way. Count assets (`ip:port`), not
documents.
- `riskscan` history is about 7 months (`-monthago:8` returns 0); use
`vulnscan` for older history, negative verdicts and the stored response.
- For `vulnscan`, add `-exists:cve` to keep only records that carry a CVE;
most vulnscan documents are negative or undecided verdicts.
- `unknownversion`, `maybevulnerable` and `partialversion` are undecided, not
"not vulnerable".
The category can be any queryable category (`datascan`, `resolver`, `ctl`,
...). For `ctiscan`/`ctiurl`, write the lines in the ctiscan field model.'
parameters:
- name: category
in: path
required: true
description: Category to query. `riskscan` and `vulnscan` are the ASM entry points.
schema:
type: string
enum:
- riskscan
- vulnscan
- datascan
- resolver
- ctl
- ctiscan
- ctiurl
example: riskscan
requestBody:
required: true
content:
text/plain:
schema:
type: string
description: One OQL line per line.
examples:
inventory:
summary: Inventory of two assets
value: 'domain:"example.com"
ip:"198.51.100.7"
'
responses:
'200':
description: NDJSON stream; each line is a document of the requested category.
content:
application/x-ndjson:
schema:
type: string
description: NDJSON. Each line is one document (CtiscanDocument or DatascanDocument, depending on the category), or a KeepaliveLine to skip.
x-ndjson-item:
anyOf:
- $ref: '#/components/schemas/CtiscanDocument'
- $ref: '#/components/schemas/DatascanDocument'
- $ref: '#/components/schemas/KeepaliveLine'
examples:
vulnscan-vulnerable:
summary: vulnscan verdict with a CVE
value: '{"@category":"vulnscan","ip":"198.51.100.7","port":443,"hostname":["vpn.example.com"],"cve":["CVE-2026-00000"],"tag":["vulnerable","cisa::kev"],"seen_date":"2026-10-18","trackquery":"category:vulnscan domain:\"example.com\" -exists:cve"}
'
'400':
description: Missing or unknown key (`error` 2 / 14), a category not in your licence (`error` 13 "API access denied"), or an unknown category (`error` 22 "API endpoint not found"). Individual lines are not validated; see the description.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
$ref: '#/components/responses/RateLimited'
x-codeSamples:
- lang: Shell
label: curl
source: "printf '%s\\n' \\\n 'domain:\"example.com\" tag:risk::exposeddatabase -since:3M -fields:ip,port,hostname,tag,seen_date' \\\n > inventory.txt\ncurl -H \"Authorization: bearer $ONYPHE_API_KEY\" \\\n -XPOST 'https://www.onyphe.io/api/v2/bulk/discovery/riskscan/asset' \\\n --data-binary @inventory.txt\n"
components:
schemas:
CtiscanDocument:
type: object
description: '**ctiscan / ctiurl data model** (IP enrichment and CTI). Layered, one document
per service (`ctiscan`) or URL (`ctiurl`). Only the most-used layers are listed;
`additionalProperties` is true. Single-field values are often arrays.
'
additionalProperties: true
properties:
'@category':
type: string
enum:
- ctiscan
- ctiurl
'@timestamp':
type: string
format: date-time
seen_date:
type: string
format: date
tag:
type: array
items:
type: string
source:
type: string
ip:
type: object
description: Scanned address and its network context.
additionalProperties: true
properties:
dest:
type: string
description: Scanned IP address.
asn:
type: string
organization:
type: string
country:
type: string
subnet:
type: string
netname:
type: string
tcp:
type: object
additionalProperties: true
properties:
dest:
type: integer
description: Port of this service.
services:
type: object
description: Every open port seen on the host.
additionalProperties: true
properties:
port:
type: array
items:
type: string
description: Port numbers as strings ("443").
app:
type: object
additionalProperties: true
properties:
protocol:
type: string
device:
type: array
items:
type: string
tls:
type: string
enum:
- 'true'
- 'false'
description: String, not a JSON boolean.
data:
type: object
description: Raw application response, up to ~1 MB.
additionalProperties: true
properties:
text:
type: string
length:
type: integer
md5:
type: string
component:
type: object
description: Detected products, vendors, versions and CPEs.
additionalProperties: true
properties:
cpe:
type: array
items:
type: string
product:
type: array
items:
type: string
vendor:
type: array
items:
type: string
version:
type: array
items:
type: string
http:
type: object
additionalProperties: true
properties:
code:
type: integer
url:
type: string
html:
type: object
additionalProperties: true
properties:
title:
type: object
properties:
text:
type: string
description: Full-text.
raw:
type: string
description: Exact/regexp.
cert:
type: object
additionalProperties: true
description: Certificate layer (subject, issuer, serial, fingerprints, validity).
dns:
type: object
additionalProperties: true
description: Forward and reverse DNS.
favicon:
type: object
additionalProperties: true
compat:
type: object
additionalProperties: true
description: Mirrors some datascan names to ease porting. Query-side names are still `compat.*`.
scanner:
type: object
additionalProperties: true
trackquery:
type: string
KeepaliveLine:
type: object
description: Progress line emitted by Discovery while the server works through batches. Not a document; skip it.
properties:
'@category':
type: string
enum:
- none
keepalive:
type: string
enum:
- 'true'
data:
type: string
example: running next batch
DatascanDocument:
type: object
description: '**datascan data model**, shared by `datascan`, `vulnscan` and `riskscan`
(ASM). Flat, with application sub-objects under `app`. `cve` and `cpe` are
root fields. `riskscan` documents carry `risk::*` tags; `vulnscan` documents
carry a verdict tag. `additionalProperties` is true.
'
additionalProperties: true
properties:
'@category':
type: string
enum:
- datascan
- vulnscan
- riskscan
'@timestamp':
type: string
format: date-time
seen_date:
type: string
format: date
ip:
type: string
ipv6:
type: string
port:
type: integer
transport:
type: string
protocol:
type: string
tls:
type: string
enum:
- 'true'
- 'false'
description: String, not a JSON boolean.
status:
type: integer
description: Application status.
hostname:
type: array
items:
type: string
description: Deduplicated hostnames from DNS and certificates.
domain:
type: array
items:
type: string
url:
type: string
asn:
type: string
organization:
type: string
country:
type: string
subnet:
type: string
product:
type: string
productvendor:
type: string
productversion:
type: array
items:
type: string
cpe:
type: array
items:
type: string
cpecount:
type: integer
cve:
type: array
items:
type: string
description: CVE identifiers detected on the service (vulnscan; propagated to riskscan/datascan).
cvecount:
type: integer
tag:
type: array
items:
type: string
description: 'Examples: `risk::exposeddatabase`, `risk::criticalcve` (riskscan);
`vulnerable`, `notvulnerable`, `maybevulnerable`, `unknownvulnerable`,
`vulnerableversion`, `notvulnerableversion`, `maybevulnerableversion`,
`partialversion`, `unknownversion`, `version` (vulnscan);
`cisa::kev`, `onyphe::kev`, `anssi::top10`, `nsa::top25`, `log4shell`;
`open` (unauthenticated access).
'
data:
type: string
description: Raw response, capped at 16384 bytes.
device:
type: object
additionalProperties: true
properties:
class:
type: string
product:
type: string
productvendor:
type: string
productversion:
type: string
app:
type: object
additionalProperties: true
description: Protocol sub-objects such as `app.http`, `app.smb`.
trackquery:
type: string
Error:
type: object
description: 'Error envelope, sent with HTTP 400. `error` is 0 on success. v2 codes are
listed in the API description (Errors). Codes published for the ASD APIs:
1 internal failure; 2 request timed out; 3 connection refused; 4 unable
to fork a new process; 1000 API not found; 1001 API access denied; 1002
parameter error; 1003 user not found; 1004 user get failed; 1005 no more
credits; 1006 search failed; 1007 task not found; 1008 creating task failed;
1009 getting task result failed; 1010 task in progress; 1011 too many
results, you should create a task; 1012 unable to kill task; 1013 resolver
failed. Other endpoints may return codes outside this list. Rate limiting
is signalled by HTTP 429.
'
properties:
error:
type: integer
description: 0 on success; see the codes above.
text:
type: string
status:
type: string
example: nok
description: v2 only.
count:
type: integer
description: v2 only.
myip:
type: string
description: v2 only.
took:
description: v2 only.
total:
type: integer
description: v2 only.
required:
- error
responses:
RateLimited:
description: Rate limit reached (about 1 request per second). Wait and retry.
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: 'v2 API key, sent as `Authorization: Bearer <key>` (scheme name case-insensitive).'
apiKeyAuth:
type: apiKey
in: header
name: X-Api-Key
description: The same API key as `bearerAuth`, sent in the `X-Api-Key` header by the ASD v1 API (Griffin View only).
externalDocs:
description: ONYPHE documentation
url: https://search.onyphe.io/docs