GovernmentFiles.ioDeclassified Intelligence Archive

API Documentation

Programmatic access to the GovernmentFiles.io document archive. Available for Researcher tier subscribers.

Authentication

All API requests require authentication using a Bearer token in the Authorization header.

Authorization: Bearer gf_live_your_api_key_here

Get your API key from the account settings.

Base URL

https://governmentfiles.io/api/v1

Search Documents

Search and filter declassified documents.

GET/api/v1/documents
Query Parameters:
  • query - Search query (keyword or semantic)
  • agency - Comma-separated agencies (e.g., CIA,FBI)
  • collection - Comma-separated collections
  • tag - Comma-separated tags
  • yearFrom - Start year (integer)
  • yearTo - End year (integer)
  • tagMode - any or all (default: any)
  • excludeFoiaLogs - true or false
  • limit - Results per page (1-200, default: 60)
  • offset - Pagination offset (default: 0)
Example Request:
curl -X GET "https://governmentfiles.io/api/v1/documents?query=UFO&agency=CIA&limit=10" \
  -H "Authorization: Bearer gf_live_your_api_key_here"
Example Response:
{
  "data": [
    {
      "id": "uuid",
      "title": "Document Title",
      "agency": "CIA",
      "year": 1968,
      "summary": "...",
      "topics": ["UFO", "Space"],
      "pdfUrl": "https://...",
      "sourceUrl": "https://..."
    }
  ],
  "error": null,
  "meta": {
    "total": 10,
    "limit": 10,
    "offset": 0,
    "hasMore": true
  }
}

Rate Limits

Each API key has a rate limit of 10,000 requests per month. The limit resets monthly.

If you exceed the limit, you'll receive a 429 Too Many Requests response. Contact support if you need higher limits.

Error Responses

401 Unauthorized

Invalid or missing API key

403 Forbidden

API key disabled or subscription inactive

429 Too Many Requests

Rate limit exceeded

Getting Started

  1. Upgrade to the Researcher tier ($39/month)
  2. Create an API key from your account settings
  3. Save your API key securely (you won't be able to see it again)
  4. Start making API requests using the examples above