# MalShare API reference

> MalShare is a repository of malware samples. Its API, for registered users, lists sample hashes and sources from the past 24 hours, searches by hash, source or file name, and reports the account's daily request allocation. Every call goes to api.php with an action query parameter and the key in…

Source: https://osinttools.io/apis/malshare/ (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/malshare/

- Base URL: https://malshare.com
- Authentication: API key in the `api_key` query parameter. Get a key: https://malshare.com/register.php The API is for registered users.
- Rate limits: Not stated in the docs as a number; the getlimit action returns the daily allocation and remaining requests.
- Vendor docs: https://malshare.com/doc.php

## Overview

MalShare is a repository of malware samples. Its API, for registered users, lists sample hashes and sources from the past 24 hours, searches by hash, source or file name, and reports the account's daily request allocation.

Every call goes to `api.php` with an `action` query parameter and the key in `api_key`. The docs also describe JSON actions (getlist, getsources, details, hashlookup, type, gettypes, download_url and its status check), file download and sample upload; their response shapes are not documented, so only the raw-text actions are described here. Downloading a sample returns malware.

## Lists

### List hashes of samples seen in the past 24 hours, as raw text.

`GET /api.php?action=getlistraw`

- Footprint: passive (the target is not contacted)

Returns a plain text list of hashes.

```bash
curl 'https://malshare.com/api.php?action=getlistraw&api_key=YOUR_API_KEY'
```

Example response (200):

```
d41d8cd98f00b204e9800998ecf8427e
0cc175b9c0f1b6a831c399e269772661
```

### List sample sources from the past 24 hours, as raw text.

`GET /api.php?action=getsourcesraw`

- Footprint: passive (the target is not contacted)

Returns a plain text list of source URLs.

```bash
curl 'https://malshare.com/api.php?action=getsourcesraw&api_key=YOUR_API_KEY'
```

Example response (200):

```
http://malware.example.com/a.exe
http://malware.example.org/b.bin
```

## Search

### Search stored samples by hash, source or file name.

`GET /api.php?action=search`

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

Searches hashes, sources and file names. The docs give the output as raw data.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `query` | query | string | yes | Search query: a hash, source or file name Example: d41d8cd98f00b204e9800998ecf8427e |

```bash
curl 'https://malshare.com/api.php?action=search&query=d41d8cd98f00b204e9800998ecf8427e&api_key=YOUR_API_KEY'
```

Example response (200):

```
d41d8cd98f00b204e9800998ecf8427e
```

## Account

### Get the daily API request allocation and the remaining count.

`GET /api.php?action=getlimit`

- Footprint: passive (the target is not contacted)

Returns raw data with the allocation and what remains.

```bash
curl 'https://malshare.com/api.php?action=getlimit&api_key=YOUR_API_KEY'
```

Example response (200):

```
LIMIT: 1000 REMAINING: 950
```

---

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/
