The MuckRock API

The MuckRock API, or application programming interface, provides a way to access MuckRock data programmatically. This guide will give you what you need to get up and running. The API is accessible through HTTPS and our Python library python-muckrock. We recommend our library for scripts, automations and notebooks. It provides a convenient helper for authenticating with your MuckRock account, searching the database and filing records requests.

Documentation

The MuckRock API has a built-in internal referential schema that lists all parameters for different endpoints and operations. We also encourage users to read through our Python library's getting started section for concrete examples of a workflow.

Rate Limiting

All endpoints aside from the users and organizations endpoints are subject to an overall 15 requests/minute rate limit, with bursts of up to 100 requests allowed before rate limiting starts. The organizations and users endpoints are limited to 5 requests per minute with no burst available.

The python-muckrock library as of 2.3.0 already implements this kind of rate limiting for you. Abuse or attempts at circumvention of the rate limits is a terms of service violation and will not be tolerated.

Endpoints

The current API endpoint isĀ https://www.muckrock.com/api_v2/. Making a query against this top-level address will provide a list of available objects and their endpoints. The current list of available objects includes:

Authentication

Some endpoint operations are accessible without providing any authentication. Others, like filing a request, require authentication. If you're ever unsure, if an operation requires authentication and you aren't authenticated you'll receive a response: "Authentication credentials were not provided".

Authentication is done using MuckRock Accounts access tokens. To retrieve your first access token, you must authenticate using username and password with a POST to the following endpoint: https://accounts.muckrock.com/api/token/