# DocumentCloud API reference

> The DocumentCloud API (run by MuckRock) lists, searches and reads documents on DocumentCloud, a repository of source documents uploaded by journalists and researchers. An investigator uses the search endpoint to find public documents by text, and the document endpoints to read their metadata and…

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

- Base URL: https://api.www.documentcloud.org/api
- Authentication: Bearer token in the `Authorization` header. Get a key: https://accounts.muckrock.com/ Optional for public documents; the token comes from POST https://accounts.muckrock.com/api/token/ and lasts 5 minutes
- Rate limits: GET /documents/search/: 15 per minute, bursts of 50. All other operations: 30 per minute. Anonymous users: 500 requests per day. Over the limits the API answers 429 or blocks with 403.
- Vendor docs: https://www.documentcloud.org/help/api/

## Overview

The DocumentCloud API (run by MuckRock) lists, searches and reads documents on DocumentCloud, a repository of source documents uploaded by journalists and researchers. An investigator uses the search endpoint to find public documents by text, and the document endpoints to read their metadata and notes. Uploading, editing, projects, sections and add-ons also exist and are described in the docs; this reference covers the read endpoints.

All endpoints except authentication are served from `https://api.www.documentcloud.org/api`. Authentication goes through the MuckRock accounts server: `POST https://accounts.muckrock.com/api/token/` with `username` and `password` returns a JWT access token (valid 5 minutes) and a refresh token (valid one day); send it as `Authorization: Bearer <access token>`. Anonymous requests are allowed but limited to 25 results per page and 500 requests a day; a free account allows `per_page` up to 100. Wildcard search is only for authenticated users.

The docs require an identifiable User-Agent with a real contact (an email or a repository link); generic or browser user agents may be blocked. Lists use cursor pagination: follow the `next` and `previous` links the API returns.

## Errors

| Status | Meaning |
| --- | --- |
| 400 | Invalid parameters; JSON body with a single error key |
| 403 | Not permitted, access token expired (after 5 minutes), or blocked for exceeding rate limits |
| 404 | ID does not exist or you cannot view it |
| 429 | Rate limit exceeded, or 500 requests per day exceeded for anonymous users |

## Documents

### Search documents with Solr-style query syntax, with highlighted matches.

`GET /documents/search/`

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

Searches the text of documents you can see. Supports phrases in double quotes, fuzzy terms with ~, and fielded queries; wildcards need an authenticated user. The response includes a top-level `count` and, with `hl=true`, a `highlights` object per result.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `q` | query | string | yes | Search query (Solr syntax, phrases in double quotes) Example: annual report |
| `hl` | query | boolean | no | Return highlighted matches Example: true |
| `per_page` | query | integer | no | Results per page: 25 by default; up to 100 for authenticated users Example: 25 |

Response fields:

- `count` (integer): Total documents matching the search
- `next` (string): URL of the next page or null
- `previous` (string): URL of the previous page or null
- `results[].id` (string): Document ID
- `results[].title` (string): Document title
- `results[].slug` (string): URL-safe title
- `results[].source` (string): Who produced the document
- `results[].access` (string): public, private or organization
- `results[].status` (string): Processing status
- `results[].language` (string): Document language
- `results[].page_count` (integer): Number of pages
- `results[].created_at` (string): Creation time
- `results[].highlights` (object): Matched snippets keyed by field or page, with <em> around hits
- `results[].asset_url` (string): Base URL for the document's static assets

```bash
curl 'https://api.www.documentcloud.org/api/documents/search/?q=annual%20report' \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

Example response (200):

```json
{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "id": "1000001",
      "user": 100000,
      "organization": 10001,
      "access": "public",
      "status": "success",
      "title": "example-annual-report",
      "slug": "example-annual-report",
      "source": "Example Agency",
      "language": "eng",
      "created_at": "2024-01-01T00:00:00.000Z",
      "updated_at": "2024-01-02T00:00:00.000Z",
      "page_count": 12,
      "highlights": {
        "title": [
          "example-<em>annual</em>-<em>report</em>"
        ]
      },
      "data": {},
      "asset_url": "https://assets.example.org/"
    }
  ]
}
```

### List documents, with filters on owner, project, access, status and dates.

`GET /documents/`

- Footprint: passive (the target is not contacted)

Lists documents you can see. Filters take comma-separated values or repeated parameters. Ordering options are created_at, page_count, title and source; a leading minus reverses.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `ordering` | query | string | no | Sort by created_at, page_count, title or source Example: created_at |
| `user` | query | integer | no | Filter by owner ID Example: 100000 |
| `organization` | query | integer | no | Filter by organization ID Example: 10001 |
| `project` | query | integer | no | Filter by a project the document is in Example: 1 |
| `access` | query | string | no | Filter by access level Example: public One of: public, private, organization |
| `status` | query | string | no | Filter by processing status Example: success |
| `created_at__gt` | query | string | no | Created after a date (YYYY-MM-DD or YYYY-MM-DD+HH:MM:SS) Example: 2024-01-01 |
| `per_page` | query | integer | no | Results per page: 25 by default; up to 100 for authenticated users Example: 25 |

Response fields:

- `next` (string): URL of the next page or null
- `previous` (string): URL of the previous page or null
- `results[].id` (integer): Document ID
- `results[].title` (string): Document title
- `results[].source` (string): Who produced the document
- `results[].access` (string): Access level
- `results[].status` (string): Processing status
- `results[].page_count` (integer): Number of pages
- `results[].canonical_url` (string): URL to view the document

```bash
curl 'https://api.www.documentcloud.org/api/documents/' \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

Example response (200):

```json
{
  "next": null,
  "previous": null,
  "results": [
    {
      "id": 1000001,
      "title": "Example annual report",
      "source": "Example Agency",
      "access": "public",
      "status": "success",
      "page_count": 12,
      "canonical_url": "https://www.example.org/documents/1000001-example-annual-report/"
    }
  ]
}
```

### Get one document with its metadata.

`GET /documents/{id}/`

- Footprint: passive (the target is not contacted)

Returns the document fields such as title, description, source, language, page count, file hash, related article and custom data. The `expand` options listed in the docs are user, organization, projects, sections, notes and revisions.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Document ID Example: 1000001 |

Response fields:

- `id` (integer): Document ID
- `title` (string): Document title
- `description` (string): Brief description
- `source` (string): Who produced the document
- `language` (string): Document language
- `access` (string): Access level
- `page_count` (integer): Number of pages
- `file_hash` (string): SHA-1 hash of the raw PDF
- `related_article` (string): URL of an article about the document
- `created_at` (string): Creation time
- `updated_at` (string): Last update time
- `data` (object): Custom metadata

```bash
curl 'https://api.www.documentcloud.org/api/documents/1000001/' \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

Example response (200):

```json
{
  "id": 1000001,
  "title": "Example annual report",
  "description": "A made-up document.",
  "source": "Example Agency",
  "language": "eng",
  "access": "public",
  "status": "success",
  "page_count": 12,
  "file_hash": "0000000000000000000000000000000000000000",
  "related_article": "https://www.example.org/article",
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-01-02T00:00:00.000Z",
  "data": {}
}
```

### Search within one document and get highlighted passages per page.

`GET /documents/{id}/search/`

- Footprint: passive (the target is not contacted)

Returns up to 25 highlights per page of results for your query, keyed by field or page number (for example page_no_9). Uses the same query syntax as document search.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Document ID Example: 1000001 |
| `q` | query | string | yes | Search query Example: report |

Response fields:

- `title` (string[]): Highlighted matches in the title
- `page_no_N` (string[]): Highlighted snippets on page N, with <em> around hits

```bash
curl 'https://api.www.documentcloud.org/api/documents/1000001/search/?q=report' \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

Example response (200):

```json
{
  "title": [
    "example-<em>report</em>"
  ],
  "page_no_9": [
    "This <em>report</em> is submitted to the example agency"
  ]
}
```

## Notes

### List the notes on a document.

`GET /documents/{document_id}/notes/`

- Footprint: passive (the target is not contacted)

Notes carry a title, a page number, optional coordinates and content that may include a few HTML tags.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `document_id` | path | integer | yes | Document ID Example: 1000001 |

Response fields:

- `results[].id` (integer): Note ID
- `results[].title` (string): Note title
- `results[].content` (string): Note content, may include HTML
- `results[].page_number` (integer): Page the note appears on
- `results[].access` (string): Access level of the note
- `results[].created_at` (string): Creation time

```bash
curl 'https://api.www.documentcloud.org/api/documents/1000001/notes/' \
  -H 'Authorization: Bearer YOUR_API_KEY'
```

Example response (200):

```json
{
  "next": null,
  "previous": null,
  "results": [
    {
      "id": 1,
      "title": "Example note",
      "content": "A made-up note.",
      "page_number": 3,
      "access": "public",
      "created_at": "2024-01-03T00:00:00.000Z"
    }
  ]
}
```

---

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/
