Quickstart
View MarkdownSet the API origin once. These examples use a shell with cURL.
API='https://security.getomg.dev'curl -fsS "$API/api/v1/status"Look up a known CVE
Section titled “Look up a known CVE”curl -fsS "$API/api/v1/cves/CVE-2024-3094?view=summary"The summary includes the CVE ID, state, revision timestamps, and KEV information when available. Omit view=summary to fetch the stored canonical record. If the API returns 404, check the identifier and whether the record has reached the index.
Find advisories for a package
Section titled “Find advisories for a package”curl -fsS -G "$API/api/v1/packages/check" \ --data-urlencode 'ecosystem=npm' \ --data-urlencode 'name=lodash'This query matches the package name within an ecosystem. Add &version=4.17.21 when checking that exact release of lodash. Check the result-limit headers before relying on a result set. The API reference explains exclusions, limits, and errors.
Follow recent revisions
Section titled “Follow recent revisions”curl -fsS "$API/api/v1/cves/recent?limit=5"Read records and copy the next_cursor value. If it is a string, use it unchanged as the next request’s URL-encoded cursor value.
curl -fsS -G "$API/api/v1/cves/recent" \ --data-urlencode 'limit=5' \ --data-urlencode "cursor=$NEXT_CURSOR"Stop when next_cursor is null. Cursors expire after one hour. Revisions can move as the index changes, so overlap repeated reads and deduplicate by CVE ID and modification timestamp.
Check the index before using the result
Section titled “Check the index before using the result”curl -fsS "$API/api/v1/metrics"Check cve_index.current before relying on the index for a time-sensitive decision. Check each latency sample count alongside its percentiles. See Data and metrics for the difference between zero, an unavailable measurement, and stale data.