Skip to content
OSINTtools.io

DocumentCloud API

MuckRock platform for uploading, OCRing, annotating, redacting, searching and publishing primary-source documents.

Base URL
https://api.www.documentcloud.org/api
Sign-in
Bearer token
Format
REST
Endpoints
5

Compiled by OSINTtools.io editors from documentcloud.org · updated Nov 29, 2026Work on this API? Claim it to keep these docs currentReport a mistake

Introduction

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.

Quick start

  1. Get a key

    Create an account with DocumentCloud and copy your bearer token. Where to get it

  2. Make your first request

    Search documents with Solr-style query syntax, with highlighted matches.. Replace YOUR_API_KEY and run it in a terminal, or use Try it on the endpoint.

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

    A 200 response looks like this, shortened.

    {
      "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": {},
    …

Authentication

Send your token in the Authorization header as Bearer YOUR_TOKEN.

Optional for public documents; the token comes from POST https://accounts.muckrock.com/api/token/ and lasts 5 minutes

Get a key from DocumentCloud

Try it on this page keeps your key in your browser; it is never sent to OSINTtools.io.

Rate limits and pricing

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.

Errors

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

Documents

  • 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.

Query parameters

orderingstring

Sort by created_at, page_count, title or source

Example: created_at
userinteger

Filter by owner ID

Example: 100000
organizationinteger

Filter by organization ID

Example: 10001
projectinteger

Filter by a project the document is in

Example: 1
accessstring

Filter by access level

Example: publicOne of: public, private, organization
statusstring

Filter by processing status

Example: success
created_at__gtstring

Created after a date (YYYY-MM-DD or YYYY-MM-DD+HH:MM:SS)

Example: 2024-01-01
per_pageinteger

Results per page: 25 by default; up to 100 for authenticated users

Example: 25
Response fields · 9Show

nextstring

URL of the next page or null

previousstring

URL of the previous page or null

idinteger

Document ID

titlestring

Document title

sourcestring

Who produced the document

accessstring

Access level

statusstring

Processing status

page_countinteger

Number of pages

canonical_urlstring

URL to view the document

curl 'https://api.www.documentcloud.org/api/documents/' \
  -H 'Authorization: Bearer YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "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/"
    }
  ]
}
  • 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.

Path parameters

idintegerrequired

Document ID

Example: 1000001
Response fields · 12Show

idinteger

Document ID

titlestring

Document title

descriptionstring

Brief description

sourcestring

Who produced the document

languagestring

Document language

accessstring

Access level

page_countinteger

Number of pages

file_hashstring

SHA-1 hash of the raw PDF

related_articlestring

URL of an article about the document

created_atstring

Creation time

updated_atstring

Last update time

dataobject

Custom metadata

curl 'https://api.www.documentcloud.org/api/documents/1000001/' \
  -H 'Authorization: Bearer YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "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": {}
}

Notes

List the notes on a document.

GET/documents/{document_id}/notes/

  • Passive: the target is not contacted

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

Path parameters

document_idintegerrequired

Document ID

Example: 1000001
Response fields · 6Show

idinteger

Note ID

titlestring

Note title

contentstring

Note content, may include HTML

page_numberinteger

Page the note appears on

accessstring

Access level of the note

created_atstring

Creation time

curl 'https://api.www.documentcloud.org/api/documents/1000001/notes/' \
  -H 'Authorization: Bearer YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "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"
    }
  ]
}