Skip to main content
Three jobs come up around a single leak. Each has its own path.
Start with search, not with a download. The download flow returns one original source file as it was found. It does not filter that file down to your username, domain or keyword.

Availability and cost

Availability: every plan with a license in force. No plan feature is checked. Cost: no metered allowance. With an API key, every call counts once toward your monthly API Calls allowance, each search page and each status poll included. Only 2xx responses count. See Rate limits. When your organization’s license is not active, every endpoint on this page returns 403:
They never return the plan-feature 403, an allowance 429 or a capacity 409. See Plans and quotas.

Does a full download make sense?

Usually not. DarknetSearch indexes the contents of leak files, not only their names. A download gives you a local copy of raw leaked material that you still have to search yourself. Search the indexed leak when you want to:
  • browse every indexed record of one leak with leakId:<id>
  • find one username, email, domain, keyword or file type inside that leak
  • get more of each record’s content with length
  • hand over a file of the matching records, not the whole leak
Download the original file when the file itself matters, for example a small CSV or document whose exact format is part of the evidence.

Find data inside one leak

If a Raw Data result gave you a leakId, use it. Otherwise find the leak first:
  • leak_simple_database_search returns one row per leak that matches your query, with resultCount. The row’s id is the leak’s ID.
  • leaks_list browses the leak index. Filter by name (3 to 100 characters).
To browse one leak, search for its ID alone:
To find one person, domain or keyword inside it, add the term:
query is one Lucene string of 3 to 1,024 characters. Narrow it with these fields: leakId, fileName, fileExtension and createdAt are fields inside query, not separate parameters. A term without a field searches content. Page and size the results with these parameters: Increase page until the response reads "last": true. Raw Data explains the query syntax and the record fields.

Export the matching records

To get the records of your search as one file, export them with the ControlLeak catalog entry instead of paging.
1

Find the catalog entry

Call list_export_services and take the id of the entry whose name is ControlLeak. Pick a format from its allowed_types.
2

Create the export

Send your Lucene query as query in args:
Here 3 is the ControlLeak entry’s id in this environment. To export only records you picked, add their id values in queryIds with includeIdStrategy set to INCLUDE. See Export only some records.
3

Poll and download

Poll get_export every 30 seconds until status is COMPLETE or FAILED. Then fetch the file with download_export. Export result sets covers the full flow and its errors.

Download an original file

Use this flow when you need one source file exactly as it was found. Download requests belong to your organization: leaks_downloads lists every request your organization has made.
1

Find the leak

Find the leak’s ID as described above. leak_detail returns its metadata, including name, numberOfFiles, numberOfRecords, tags and size. The path has no trailing slash.
2

List the files in the leak

leak_files lists the files attached to the leak. It pages with page (from 0) and size (10 to 100). The path has no trailing slash.
Each file in content has an id, a name, a size and a createdAt:
Check name and size before you request a file. A large dump is better searched than downloaded.
3

Request the file

request_to_download_leak_file prepares a copy of one file. Send the leak’s ID as leakId and the file’s id from leak_files as digest. Both are required.
The response is the download request: its id, the file name and size, a status, an errorText, and createdAt and updatedAt. Keep the id.
4

Wait for the file

leaks_downloads lists your organization’s download requests, newest first. It pages like leak_files.
Find your request by id and read its status. status and errorText come from the leak service unchanged. Download once status reports the file as ready. A non-empty errorText is the leak service’s message about the request; read it before you request the file again.
5

Download the file

download_leak_file streams the prepared file. Pass the download request id. The path has no trailing slash.
The response passes on the content type and file name that the leak service sets. If the leak service refuses the download, you get its 4xx status and body unchanged. Check the request in leaks_downloads again before you retry.

Errors

Every error body the API returns is listed in Handle API errors.

Endpoints