API Documentation
HashScanner REST API
Look up file hash reputation — MD5, SHA-1, and SHA-256 — directly from your code. One simple, Bearer-authenticated endpoint. JSON in, JSON out.
Overview
The HashScanner API puts the NIST NSRL online — 1.5 billion+ known files, queryable instantly without downloading the Reference Data Set. It’s a standard REST service over HTTPS: every request is authenticated with a Bearer token, responses are JSON, and outcomes are signalled with conventional HTTP status codes. A match means the file is cataloged in NSRL — not a safe or malicious verdict.
New to APIs? Start with the Quick start below — copy a snippet in your language, paste in your API key, and run it. Building at scale? Jump to Bulk lookups and Rate limits & quota.
Client libraries & integrations
Prefer not to call the REST endpoints directly? Drop HashScanner straight into your stack:
- Python client & CLI —
hashscanneron PyPI (single + bulk lookups; source on GitHub). - Cortex analyzer for TheHive/Cortex — look up hash observables in the NSRL from your SIRP: hashscanner-cortex.
Authentication
Every request must include your secret API key in the Authorization header as a Bearer token. Keys are generated automatically when you create an account and are shown in your member dashboard.
An API key has two parts: a permanent key ID and a rotatable secret.
- Find your key in the dashboard under the API key widget after signing in.
- You can regenerate the secret at any time. The old secret stops working immediately; the key ID stays the same.
- Treat the key like a password — never commit it to source control or expose it in client-side code.
Requests without a valid key return 401 Unauthorized.
Base URL
All endpoints are served under the versioned base URL over HTTPS:
Endpoints
Need just a few hashes? Call the single endpoint concurrently. For large sets, submit a bulk job. The maximum hashes per job and your monthly total depend on your plan — see Rate limits & quota.
Quick start — single lookup
Replace hs_xxxxxxxxxx_sk_… with your own key and run. This looks up a single MD5 hash.
Bulk lookup (async)
For large sets — up to 100,000 hashes — submit an asynchronous job. The flow has three steps:
- Submit —
POST /v1/hash/bulkwith your hashes in the JSON body. Ajob_idis returned immediately (202 Accepted). - Poll —
GET /v1/hash/bulk/{job_id}every few seconds untilstatusiscompleted(honour theRetry-Afterheader). - Download — fetch the
results_urlfrom the completed response to stream the results file (NDJSON or CSV).
Each hash counts as one lookup against your monthly quota (charged when the job is accepted). The per-job maximum and your monthly total depend on your plan. The snippet below runs the full submit → poll → download flow.
Response
The single-hash endpoint returns one object. The bulk flow returns a job envelope at submission, a status object while polling, and a downloadable results file on completion. The data object is present only when found is true.
Single hash
If the hash is not in the dataset, the API returns 404 with { "found": false }.
Bulk job — submit (202 Accepted)
Bulk job — polling
A failed job returns { "status": "failed", "error": "..." }.
Bulk job — results file
Download results_url to stream the file. NDJSON (default) is one JSON record per line — ideal for streaming large sets:
Request "format": "csv" at submission to get a spreadsheet-friendly file instead:
Fields
| Field | Type | Description |
|---|---|---|
found | boolean | Whether the hash exists in the dataset. |
hash | string | The queried hash (single-hash response). |
type | string | Detected hash type: md5, sha1, or sha256. |
data | object | Metadata for the file. Present only when found is true. |
data.reputation.status | string | Reputation classification (e.g. known). |
data.reputation.source | string | Intelligence source (e.g. NSRL). |
data.file.file_name | string | Original file name. |
data.file.file_size | integer | File size in bytes. |
data.package.name | string | Software package the file ships with. |
data.operating_system.name | string | Associated operating system. |
data.manufacturer | string | Software vendor / manufacturer. |
data.language | string | File or product language. |
data.application_type | string | File category (e.g. Operating System). |
data.version.description | string | Dataset build description. |
Available metadata fields vary by record — fields without a value for a given file are omitted.
Bulk job fields
| Field | Type | Description |
|---|---|---|
job_id | string | Unique identifier for the bulk job. |
status | string | Job state: queued, processing, completed, or failed. |
total | integer | Number of hashes accepted for the job. |
processed | integer | Hashes processed so far (while processing). |
found / not_found | integer | Counts at completion. |
format | string | Result file format: json (NDJSON) or csv. |
results_url | string | Time-limited URL to download the results file. |
expires_at | string | ISO-8601 timestamp when the results file is purged. |
Errors & status codes
The API uses standard HTTP status codes. Error responses carry a JSON body with an error message.
| Status | Meaning |
|---|---|
200 OK | Request succeeded (single lookup, or bulk job poll). |
202 Accepted | Bulk job created — poll the status_url for progress. |
400 Bad Request | Malformed body, invalid hash, or more than 100,000 hashes in one bulk job. |
401 Unauthorized | API key missing, malformed, unknown, or invalid. |
403 Forbidden | Subscription inactive — renew or upgrade to continue. |
404 Not Found | Single lookup: hash not in the dataset ({ "found": false }). Bulk: unknown or expired job ID. Also returned for an unrecognised path. |
405 Method Not Allowed | Wrong HTTP method for the endpoint (e.g. POST to a lookup path). |
429 Too Many Requests | Per-minute rate limit or monthly quota exceeded. |
Rate limits & quota
Three limits apply, all determined by your plan:
- Monthly quota — total hash lookups per billing period. Each hash counts as one, so a bulk job of N hashes consumes N (charged when the job is accepted).
- Rate limit — maximum API requests per minute.
- Bulk job size — maximum hashes per bulk job, up to 100,000 (plan-dependent).
Exceeding any of these returns 429 Too Many Requests. Rate-limit headers are included on responses:
Completed bulk results files are retained for about 72 hours, then purged — download them promptly. Track your live usage, remaining quota, and reset date in your member dashboard, and compare per-plan limits on the pricing page.
Get your API key
Sign up for a free account and start integrating in minutes.