# URLhaus API reference

> The URLhaus API answers questions about URLs that abuse.ch has recorded as distributing malware: whether a URL, host, payload hash, tag or malware family is known, and what is linked to it. An investigator uses it to check a suspicious link, a domain or IP, or a file hash. Base URL is…

Source: https://osinttools.io/apis/urlhaus/ (Markdown view of an OSINTtools.io page; append `.md` to any page URL for this format).

Compiled by OSINTtools.io editors from the vendor's docs, updated Nov 29, 2026. Listing: https://osinttools.io/tools/urlhaus/

- Base URL: https://urlhaus-api.abuse.ch/v1
- Authentication: API key in the `Auth-Key` header. Get a key: https://auth.abuse.ch/ Free key from the abuse.ch Authentication Portal
- Free tier: yes
- Pricing: Free
- Rate limits: Not stated in the docs
- Vendor docs: https://urlhaus.abuse.ch/api/

## Overview

The URLhaus API answers questions about URLs that abuse.ch has recorded as distributing malware: whether a URL, host, payload hash, tag or malware family is known, and what is linked to it. An investigator uses it to check a suspicious link, a domain or IP, or a file hash.

Base URL is `https://urlhaus-api.abuse.ch/v1/`. Every request needs an `Auth-Key` header; keys are free from the abuse.ch Authentication Portal. The lookup endpoints are POST requests with form data and the recent-lists are GET. Responses are JSON and start with `query_status`.

The docs describe it as free under abuse.ch fair use; commercial use may need a paid plan. The payload download endpoint (`/download/<sha256>/`, a ZIP that may trigger antivirus) and the bulk dumps are not covered here.

## Errors

| Status | Meaning |
| --- | --- |
| 200 | Errors are reported in the body as query_status: no_results, invalid_url, invalid_host, invalid_md5, invalid_sha256, http_get_expected, http_post_expected |

## Lookups

### Look up a URL in the URLhaus database.

`POST /url/`

- Takes: URL
- Footprint: passive (the target is not contacted)

Returns the URL's status, threat, tags, blacklist listings and the payloads seen on it (up to 100).

Response fields:

- `query_status` (string): ok, no_results, invalid_url
- `id` (string): URLhaus ID
- `url` (string): The URL
- `url_status` (string): online, offline or unknown
- `host` (string): Hostname or IP of the URL
- `date_added` (string): When the URL was added
- `threat` (string): malware_download
- `tags` (array): Tags on the URL
- `payloads[]` (object): Payloads seen on this URL (up to 100): file type, hashes, signature

```bash
curl -X POST 'https://urlhaus-api.abuse.ch/v1/url/' \
  -H 'Auth-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d '{
  "url": "http://example.com/files/bin.sh"
}'
```

Example response (200):

```json
{
  "query_status": "ok",
  "id": "100001",
  "url": "http://example.com/files/bin.sh",
  "url_status": "offline",
  "host": "example.com",
  "date_added": "2026-01-01 00:00:00 UTC",
  "threat": "malware_download",
  "tags": [
    "elf"
  ],
  "payloads": [
    {
      "filename": "bin.sh",
      "file_type": "sh",
      "response_sha256": "0000000000000000000000000000000000000000000000000000000000000000",
      "signature": null
    }
  ]
}
```

### Look up a host (IPv4, hostname or domain) and the malware URLs seen on it.

`POST /host/`

- Takes: Domain, IP address
- Footprint: passive (the target is not contacted)

Returns first seen date, URL count, blacklist listings (not for IP addresses) and up to 100 URLs. Case-insensitive.

Response fields:

- `query_status` (string): ok or no_results
- `firstseen` (string): When the host was first seen
- `url_count` (string): Number of URLs on the host
- `blacklists` (object): surbl and spamhaus_dbl listings
- `urls[]` (object): URLs on the host (up to 100)

```bash
curl -X POST 'https://urlhaus-api.abuse.ch/v1/host/' \
  -H 'Auth-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d '{
  "host": "example.com"
}'
```

Example response (200):

```json
{
  "query_status": "ok",
  "firstseen": "2026-01-01 00:00:00 UTC",
  "url_count": "1",
  "blacklists": {
    "surbl": "not listed",
    "spamhaus_dbl": "not listed"
  },
  "urls": [
    {
      "url": "http://example.com/files/bin.sh",
      "url_status": "offline"
    }
  ]
}
```

### Look up a malware sample by MD5 or SHA256 hash.

`POST /payload/`

- Takes: File
- Footprint: passive (the target is not contacted)

Returns file type, size, signature, first and last seen and up to 100 URLs that served it.

Response fields:

- `query_status` (string): ok, no_results, invalid_md5, invalid_sha256
- `md5_hash` (string): MD5 of the payload
- `sha256_hash` (string): SHA256 of the payload
- `file_type` (string): File type
- `signature` (string): Malware family signature
- `url_count` (string): Number of URLs that served it
- `urls[]` (object): URLs (up to 100): url_id, url, url_status, filename, firstseen, lastseen

```bash
curl -X POST 'https://urlhaus-api.abuse.ch/v1/payload/' \
  -H 'Auth-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d '{
  "sha256_hash": "0000000000000000000000000000000000000000000000000000000000000000"
}'
```

Example response (200):

```json
{
  "query_status": "ok",
  "md5_hash": "00000000000000000000000000000000",
  "sha256_hash": "0000000000000000000000000000000000000000000000000000000000000000",
  "file_type": "elf",
  "signature": "ExampleFamily",
  "url_count": "1",
  "urls": [
    {
      "url_id": "100001",
      "url": "http://example.com/files/bin.sh",
      "url_status": "offline"
    }
  ]
}
```

### List URLs carrying a tag.

`POST /tag/`

- Footprint: passive (the target is not contacted)

Returns first and last seen, URL count and up to 1000 URLs. Case-insensitive.

Response fields:

- `query_status` (string): ok or no_results
- `firstseen` (string): First seen
- `lastseen` (string): Last seen
- `url_count` (string): Number of URLs with the tag
- `urls[]` (object): URLs with the tag (up to 1000)

```bash
curl -X POST 'https://urlhaus-api.abuse.ch/v1/tag/' \
  -H 'Auth-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d '{
  "tag": "elf"
}'
```

Example response (200):

```json
{
  "query_status": "ok",
  "firstseen": "2026-01-01 00:00:00 UTC",
  "url_count": "1",
  "urls": [
    {
      "url": "http://example.com/files/bin.sh"
    }
  ]
}
```

## Recent additions

### Recently added malware URLs (past 3 days, up to 1000).

`GET /urls/recent/`

- Footprint: passive (the target is not contacted)

Append `limit/N/` to the path to cap the count, as in `/urls/recent/limit/10/`.

Response fields:

- `query_status` (string): ok
- `urls[].id` (string): URLhaus ID
- `urls[].url` (string): The URL
- `urls[].url_status` (string): online, offline or unknown
- `urls[].host` (string): Host of the URL
- `urls[].date_added` (string): When added
- `urls[].threat` (string): malware_download
- `urls[].tags` (array): Tags

```bash
curl 'https://urlhaus-api.abuse.ch/v1/urls/recent/' \
  -H 'Auth-Key: YOUR_API_KEY'
```

Example response (200):

```json
{
  "query_status": "ok",
  "urls": [
    {
      "id": "100001",
      "url": "http://example.com/files/bin.sh",
      "url_status": "online",
      "host": "example.com",
      "date_added": "2026-01-01 00:00:00 UTC",
      "threat": "malware_download",
      "tags": [
        "elf"
      ]
    }
  ]
}
```

---

Listings on OSINTtools.io are reviewed by editors and re-verified on a schedule; check pricing and availability on the vendor's site before relying on them, and use OSINT tools only with a lawful basis.
Site index for agents: https://osinttools.io/llms.txt · Full catalog: https://osinttools.io/llms-full.txt · MCP server (Streamable HTTP, no auth): https://osinttools.io/mcp/
