{"openapi":"3.1.0","info":{"title":"TrumpTracker Records API","version":"1.0.0","description":"Evidence-first machine access to the TrumpTracker archive: events, statements, promises, receipts, executive actions, people, and topics, each with source provenance. Evidence is described identically regardless of whom it favors. See /agents for the human documentation and citation rules.","contact":{"url":"https://trumpstracker.com/agents"}},"servers":[{"url":"https://trumpstracker.com"}],"security":[{"apiKey":[]},{}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Optional API key (trk_ prefix). Raises rate limits and unlocks synthesized research answers."}}},"paths":{"/api/v1/search":{"get":{"summary":"Hybrid keyword search across all record types","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","maximum":50}},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"Event/signed date lower bound (YYYY-MM-DD)"},{"name":"to","in":"query","schema":{"type":"string","format":"date"}},{"name":"q","in":"query","required":true,"schema":{"type":"string","maxLength":200}},{"name":"type","in":"query","schema":{"type":"string","enum":["all","events","statements","promises","executive_actions"]}},{"name":"primary_only","in":"query","schema":{"type":"boolean"}},{"name":"verified_only","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Ranked search hits with canonical URLs","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"request_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"data_version":{"type":"string"},"source_name":{"type":"string","const":"TrumpTracker"},"canonical_url":{"type":"string"},"source_count":{"type":"integer"},"freshness":{"type":"string","enum":["healthy","degraded","stale"]},"warnings":{"type":"array","items":{"type":"string"}}},"required":["request_id","generated_at","data_version","source_name"]}},"required":["data","meta"]}}}}}}},"/api/v1/events":{"get":{"summary":"List published event records","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","maximum":50}},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"Event/signed date lower bound (YYYY-MM-DD)"},{"name":"to","in":"query","schema":{"type":"string","format":"date"}},{"name":"type","in":"query","schema":{"type":"string"}},{"name":"term","in":"query","schema":{"type":"string"},"description":"Administration/campaign era key"},{"name":"offset","in":"query","schema":{"type":"integer","maximum":5000}}],"responses":{"200":{"description":"Event summaries","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"request_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"data_version":{"type":"string"},"source_name":{"type":"string","const":"TrumpTracker"},"canonical_url":{"type":"string"},"source_count":{"type":"integer"},"freshness":{"type":"string","enum":["healthy","degraded","stale"]},"warnings":{"type":"array","items":{"type":"string"}}},"required":["request_id","generated_at","data_version","source_name"]}},"required":["data","meta"]}}}}}}},"/api/v1/events/{id}":{"get":{"summary":"Get one event with quotes, sources, topics, and related events","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Record id, canonical slug, or (for executive actions) Federal Register document number"}],"responses":{"200":{"description":"Full event record","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"request_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"data_version":{"type":"string"},"source_name":{"type":"string","const":"TrumpTracker"},"canonical_url":{"type":"string"},"source_count":{"type":"integer"},"freshness":{"type":"string","enum":["healthy","degraded","stale"]},"warnings":{"type":"array","items":{"type":"string"}}},"required":["request_id","generated_at","data_version","source_name"]}},"required":["data","meta"]}}}}}}},"/api/v1/statements":{"get":{"summary":"List statement records with quote-kind and source provenance","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","maximum":50}},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"Event/signed date lower bound (YYYY-MM-DD)"},{"name":"to","in":"query","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Statements","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"request_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"data_version":{"type":"string"},"source_name":{"type":"string","const":"TrumpTracker"},"canonical_url":{"type":"string"},"source_count":{"type":"integer"},"freshness":{"type":"string","enum":["healthy","degraded","stale"]},"warnings":{"type":"array","items":{"type":"string"}}},"required":["request_id","generated_at","data_version","source_name"]}},"required":["data","meta"]}}}}}}},"/api/v1/statements/{id}":{"get":{"summary":"Get one statement","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Record id, canonical slug, or (for executive actions) Federal Register document number"}],"responses":{"200":{"description":"Statement","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"request_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"data_version":{"type":"string"},"source_name":{"type":"string","const":"TrumpTracker"},"canonical_url":{"type":"string"},"source_count":{"type":"integer"},"freshness":{"type":"string","enum":["healthy","degraded","stale"]},"warnings":{"type":"array","items":{"type":"string"}}},"required":["request_id","generated_at","data_version","source_name"]}},"required":["data","meta"]}}}}}}},"/api/v1/promises":{"get":{"summary":"List campaign promises with editorial statuses","parameters":[{"name":"category","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","maximum":50}}],"responses":{"200":{"description":"Promises","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"request_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"data_version":{"type":"string"},"source_name":{"type":"string","const":"TrumpTracker"},"canonical_url":{"type":"string"},"source_count":{"type":"integer"},"freshness":{"type":"string","enum":["healthy","degraded","stale"]},"warnings":{"type":"array","items":{"type":"string"}}},"required":["request_id","generated_at","data_version","source_name"]}},"required":["data","meta"]}}}}}}},"/api/v1/promises/{id}":{"get":{"summary":"Get one promise with full status history and evidence","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Record id, canonical slug, or (for executive actions) Federal Register document number"}],"responses":{"200":{"description":"Promise with status_history","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"request_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"data_version":{"type":"string"},"source_name":{"type":"string","const":"TrumpTracker"},"canonical_url":{"type":"string"},"source_count":{"type":"integer"},"freshness":{"type":"string","enum":["healthy","degraded","stale"]},"warnings":{"type":"array","items":{"type":"string"}}},"required":["request_id","generated_at","data_version","source_name"]}},"required":["data","meta"]}}}}}}},"/api/v1/receipts":{"get":{"summary":"List published receipts (statement comparisons)","responses":{"200":{"description":"Receipts","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"request_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"data_version":{"type":"string"},"source_name":{"type":"string","const":"TrumpTracker"},"canonical_url":{"type":"string"},"source_count":{"type":"integer"},"freshness":{"type":"string","enum":["healthy","degraded","stale"]},"warnings":{"type":"array","items":{"type":"string"}}},"required":["request_id","generated_at","data_version","source_name"]}},"required":["data","meta"]}}}}}}},"/api/v1/receipts/{id}":{"get":{"summary":"Get one receipt with both statements and sources","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Record id, canonical slug, or (for executive actions) Federal Register document number"}],"responses":{"200":{"description":"Receipt","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"request_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"data_version":{"type":"string"},"source_name":{"type":"string","const":"TrumpTracker"},"canonical_url":{"type":"string"},"source_count":{"type":"integer"},"freshness":{"type":"string","enum":["healthy","degraded","stale"]},"warnings":{"type":"array","items":{"type":"string"}}},"required":["request_id","generated_at","data_version","source_name"]}},"required":["data","meta"]}}}}}}},"/api/v1/executive-actions":{"get":{"summary":"List executive actions (Federal Register sourced)","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","maximum":50}},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"Event/signed date lower bound (YYYY-MM-DD)"},{"name":"to","in":"query","schema":{"type":"string","format":"date"}},{"name":"type","in":"query","schema":{"type":"string","enum":["executive_order","proclamation","memorandum","pardon","appointment","agency_directive","other"]}},{"name":"offset","in":"query","schema":{"type":"integer","maximum":5000}}],"responses":{"200":{"description":"Executive actions with policy_status and primary sources","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"request_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"data_version":{"type":"string"},"source_name":{"type":"string","const":"TrumpTracker"},"canonical_url":{"type":"string"},"source_count":{"type":"integer"},"freshness":{"type":"string","enum":["healthy","degraded","stale"]},"warnings":{"type":"array","items":{"type":"string"}}},"required":["request_id","generated_at","data_version","source_name"]}},"required":["data","meta"]}}}}}}},"/api/v1/executive-actions/{id}":{"get":{"summary":"Get one executive action","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Record id, canonical slug, or (for executive actions) Federal Register document number"}],"responses":{"200":{"description":"Executive action","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"request_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"data_version":{"type":"string"},"source_name":{"type":"string","const":"TrumpTracker"},"canonical_url":{"type":"string"},"source_count":{"type":"integer"},"freshness":{"type":"string","enum":["healthy","degraded","stale"]},"warnings":{"type":"array","items":{"type":"string"}}},"required":["request_id","generated_at","data_version","source_name"]}},"required":["data","meta"]}}}}}}},"/api/v1/people":{"get":{"summary":"List tracked public figures (public roles only)","responses":{"200":{"description":"People","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"request_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"data_version":{"type":"string"},"source_name":{"type":"string","const":"TrumpTracker"},"canonical_url":{"type":"string"},"source_count":{"type":"integer"},"freshness":{"type":"string","enum":["healthy","degraded","stale"]},"warnings":{"type":"array","items":{"type":"string"}}},"required":["request_id","generated_at","data_version","source_name"]}},"required":["data","meta"]}}}}}}},"/api/v1/topics":{"get":{"summary":"List the topic taxonomy","responses":{"200":{"description":"Topics","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"request_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"data_version":{"type":"string"},"source_name":{"type":"string","const":"TrumpTracker"},"canonical_url":{"type":"string"},"source_count":{"type":"integer"},"freshness":{"type":"string","enum":["healthy","degraded","stale"]},"warnings":{"type":"array","items":{"type":"string"}}},"required":["request_id","generated_at","data_version","source_name"]}},"required":["data","meta"]}}}}}}},"/api/v1/timeline":{"get":{"summary":"Build a chronological timeline for a topic or query","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","maximum":50}},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"Event/signed date lower bound (YYYY-MM-DD)"},{"name":"to","in":"query","schema":{"type":"string","format":"date"}},{"name":"topic","in":"query","schema":{"type":"string"}},{"name":"q","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Chronological event entries","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"request_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"data_version":{"type":"string"},"source_name":{"type":"string","const":"TrumpTracker"},"canonical_url":{"type":"string"},"source_count":{"type":"integer"},"freshness":{"type":"string","enum":["healthy","degraded","stale"]},"warnings":{"type":"array","items":{"type":"string"}}},"required":["request_id","generated_at","data_version","source_name"]}},"required":["data","meta"]}}}}}},"post":{"summary":"Build a timeline (JSON body variant)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"topic":{"type":"string"},"query":{"type":"string"},"start_date":{"type":"string","format":"date"},"end_date":{"type":"string","format":"date"},"limit":{"type":"integer","maximum":50}}}}}},"responses":{"200":{"description":"Chronological event entries","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"request_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"data_version":{"type":"string"},"source_name":{"type":"string","const":"TrumpTracker"},"canonical_url":{"type":"string"},"source_count":{"type":"integer"},"freshness":{"type":"string","enum":["healthy","degraded","stale"]},"warnings":{"type":"array","items":{"type":"string"}}},"required":["request_id","generated_at","data_version","source_name"]}},"required":["data","meta"]}}}}}}},"/api/v1/compare-statements":{"post":{"summary":"Compare two statements, by id or by topic and date ranges","description":"Returns both statements with sources. Includes an editorial classification only when a human-reviewed receipt exists; TrumpTracker does not auto-generate contested verdicts.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"statement_a":{"type":"string"},"statement_b":{"type":"string"},"topic":{"type":"string"},"date_range_a":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}}},"date_range_b":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}}}}}}}},"responses":{"200":{"description":"Statement comparison","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"request_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"data_version":{"type":"string"},"source_name":{"type":"string","const":"TrumpTracker"},"canonical_url":{"type":"string"},"source_count":{"type":"integer"},"freshness":{"type":"string","enum":["healthy","degraded","stale"]},"warnings":{"type":"array","items":{"type":"string"}}},"required":["request_id","generated_at","data_version","source_name"]}},"required":["data","meta"]}}}}}}},"/api/v1/research":{"post":{"summary":"Evidence-first research over the archive","description":"Always returns a structured Evidence Packet (records, timeline, sources). Synthesized natural-language answers with citations require an API key. Confidence reflects evidence completeness, not probability of truth. Insufficient evidence returns an explicit statement, never a guess.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["question"],"properties":{"question":{"type":"string","minLength":5,"maxLength":500},"start_date":{"type":"string","format":"date"},"end_date":{"type":"string","format":"date"},"mode":{"type":"string","enum":["quick","deep","timeline","contradictions","fact_check","compare","explain","compare_terms"]}}}}}},"responses":{"200":{"description":"Evidence packet, plus synthesized answer for authenticated callers","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"request_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"data_version":{"type":"string"},"source_name":{"type":"string","const":"TrumpTracker"},"canonical_url":{"type":"string"},"source_count":{"type":"integer"},"freshness":{"type":"string","enum":["healthy","degraded","stale"]},"warnings":{"type":"array","items":{"type":"string"}}},"required":["request_id","generated_at","data_version","source_name"]}},"required":["data","meta"]}}}}}}},"/api/v1/freshness":{"get":{"summary":"Ingestion pipeline freshness report","responses":{"200":{"description":"Per-pipeline freshness with HEALTHY/DELAYED/STALE/FAILED statuses","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"request_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"data_version":{"type":"string"},"source_name":{"type":"string","const":"TrumpTracker"},"canonical_url":{"type":"string"},"source_count":{"type":"integer"},"freshness":{"type":"string","enum":["healthy","degraded","stale"]},"warnings":{"type":"array","items":{"type":"string"}}},"required":["request_id","generated_at","data_version","source_name"]}},"required":["data","meta"]}}}}}}},"/api/v1/version":{"get":{"summary":"API, data, and deployment versions","responses":{"200":{"description":"Version info","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"request_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"data_version":{"type":"string"},"source_name":{"type":"string","const":"TrumpTracker"},"canonical_url":{"type":"string"},"source_count":{"type":"integer"},"freshness":{"type":"string","enum":["healthy","degraded","stale"]},"warnings":{"type":"array","items":{"type":"string"}}},"required":["request_id","generated_at","data_version","source_name"]}},"required":["data","meta"]}}}}}}},"/api/v1/health":{"get":{"summary":"Service health","responses":{"200":{"description":"Health status"}}}}}}