[preview] Get a filing

​

Preview. Access is available upon request: contact support@midpage.ai. Requires an organization API key with Full access.

Retrieve one filing: its text and a link to the file. Filings we already have are free. For a federal filing we don't have, we fetch it from PACER and charge your PACER balance; that needs PACER fetches turned on. See Dockets and filings.

Send case_id and one of filing_id or entry_number.

Body·

required
application/json

Send case_id and exactly one of filing_id or entry_number. attachment_number is only allowed with entry_number.

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/filings/get
curl https://app.midpage.ai/api/v1/filings/get \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "case_id": "5c1f9e2a-7d43-4b8e-9a61-2f0c8d3e4b17",
  "filing_id": "c9f1a2b3-4d5e-4f60-8a7b-9c0d1e2f3a4b"
}'
A filing fetched from PACER
{
  "filing": {
    "filing_id": "c9f1a2b3-4d5e-4f60-8a7b-9c0d1e2f3a4b",
    "case_id": "5c1f9e2a-7d43-4b8e-9a61-2f0c8d3e4b17",
    "court_id": "nysd",
    "docket_number": "1:24-cv-00533",
    "entry_number": "42",
    "attachment_number": null,
    "date_filed": "2026-09-30",
    "description": "MOTION to Dismiss for Lack of Jurisdiction",
    "midpage_url": "https://app.midpage.ai/case/5c1f9e2a-7d43-4b8e-9a61-2f0c8d3e4b17/docket/c9f1a2b3-4d5e-4f60-8a7b-9c0d1e2f3a4b",
    "content_type": "application/pdf",
    "file_url": "https://app.midpage.ai/api/case/5c1f9e2a-7d43-4b8e-9a61-2f0c8d3e4b17/docket/e4a7b2c1-9d3f-5a6b-8c7d-2e1f0a9b8c7d/raw",
    "text": "UNITED STATES DISTRICT COURT\nSOUTHERN DISTRICT OF NEW YORK\n..."
  },
  "cost": {
    "pacer_cents": 40,
    "pacer_pages": 4,
    "balance_cents": 46930
  }
}