{"openapi":"3.1.0","info":{"title":"The $2 Bill API","description":"Public REST API for The $2 Bill — access facts, values, gallery, and more. Powered by PH3AR / PlatPhormNews.\n\nPowered by [PlatPhormNews](https://platphormnews.com) and [PH3AR](https://ph3ar.com)\n\nCreated by **Michael Barbine** — [michael@barbineworldwide.com](mailto:michael@barbineworldwide.com) | [@BigNerdLoLz](https://twitter.com/BigNerdLoLz) | [github.com/mbarbine](https://github.com/mbarbine)","version":"v1","contact":{"name":"Michael Barbine","email":"michael@barbineworldwide.com","url":"https://platphormnews.com"},"license":{"name":"MIT","url":"https://opensource.org/licenses/MIT"},"x-logo":{"url":"https://two.platphormnews.com/images/og-image.jpg","altText":"The $2 Bill API"}},"servers":[{"url":"https://two.platphormnews.com/api","description":"Production"}],"tags":[{"name":"Core","description":"Core API endpoints"},{"name":"Data","description":"Data access endpoints"},{"name":"Feed","description":"RSS / Atom feed endpoints"},{"name":"Webhooks","description":"Webhook subscription and delivery endpoints"},{"name":"MCP","description":"Model Context Protocol (AI tool) endpoints"}],"paths":{"/":{"get":{"summary":"API Root","description":"Returns API metadata, version, and a full endpoint listing.","operationId":"getApiRoot","tags":["Core"],"responses":{"200":{"description":"API information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiRoot"}}}}}}},"/info":{"get":{"summary":"Site Information","description":"Returns general site information, links, and attribution.","operationId":"getInfo","tags":["Core"],"responses":{"200":{"description":"Site info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteInfo"}}}}}}},"/facts":{"get":{"summary":"Get Facts","description":"Returns a list of $2 bill facts, optionally filtered by category.","operationId":"getFacts","tags":["Data"],"parameters":[{"name":"category","in":"query","description":"Filter by category: production, history, value, culture, trivia, hacks","required":false,"schema":{"type":"string","enum":["production","history","value","culture","trivia","hacks"]}},{"name":"locale","in":"query","required":false,"schema":{"type":"string","default":"en"}}],"responses":{"200":{"description":"Array of facts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FactsResponse"}}}}}}},"/value":{"get":{"summary":"Get Value Guide","description":"Returns valuation data for $2 bills by era and condition.","operationId":"getValue","tags":["Data"],"responses":{"200":{"description":"Value data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueResponse"}}}}}}},"/gallery":{"get":{"summary":"Gallery Data","description":"Returns gallery image metadata.","operationId":"getGallery","tags":["Data"],"responses":{"200":{"description":"Gallery items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GalleryResponse"}}}}}}},"/rss":{"get":{"summary":"RSS Feed","description":"Returns an RSS 2.0 feed of site content and updates.","operationId":"getRss","tags":["Feed"],"parameters":[{"name":"locale","in":"query","required":false,"schema":{"type":"string","default":"en"}}],"responses":{"200":{"description":"RSS XML feed","content":{"application/xml":{"schema":{"type":"string"}}}}}}},"/webhooks/subscribe":{"post":{"summary":"Subscribe to Webhooks","description":"Register a webhook URL to receive real-time event notifications. Compatible with Zapier, n8n, Make, and custom endpoints.","operationId":"subscribeWebhook","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscribeRequest"}}}},"responses":{"201":{"description":"Subscription created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscribeResponse"}}}},"400":{"description":"Bad request"}}}},"/webhooks/zapier":{"post":{"summary":"Zapier Webhook Trigger","description":"Zapier-compatible webhook endpoint for automation workflows.","operationId":"zapierWebhook","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPayload"}}}},"responses":{"200":{"description":"Event received"}}}},"/webhooks/n8n":{"post":{"summary":"n8n Webhook Trigger","description":"n8n-compatible webhook endpoint for workflow automation.","operationId":"n8nWebhook","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPayload"}}}},"responses":{"200":{"description":"Event received"}}}},"/mcp":{"get":{"summary":"MCP Manifest","description":"Model Context Protocol manifest listing available AI tools.","operationId":"getMcpManifest","tags":["MCP"],"responses":{"200":{"description":"MCP tool manifest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpManifest"}}}}}},"post":{"summary":"MCP Tool Invocation","description":"Invoke an MCP tool by name with arguments.","operationId":"invokeMcpTool","tags":["MCP"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpRequest"}}}},"responses":{"200":{"description":"Tool result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpResponse"}}}},"400":{"description":"Unknown tool or bad request"}}}}},"components":{"schemas":{"ApiRoot":{"type":"object","properties":{"api":{"type":"string"},"version":{"type":"string"},"description":{"type":"string"},"docs":{"type":"string","format":"uri"},"openapi":{"type":"string","format":"uri"}}},"SiteInfo":{"type":"object","properties":{"site":{"type":"string"},"network":{"type":"string"},"community":{"type":"string"},"author":{"type":"object"}}},"Fact":{"type":"object","properties":{"id":{"type":"string"},"category":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"source":{"type":"string"}}},"FactsResponse":{"type":"object","properties":{"total":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/components/schemas/Fact"}}}},"ValueEntry":{"type":"object","properties":{"era":{"type":"string"},"condition":{"type":"string"},"value":{"type":"string"},"notes":{"type":"string"}}},"ValueResponse":{"type":"object","properties":{"total":{"type":"integer"},"disclaimer":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/ValueEntry"}}}},"GalleryResponse":{"type":"object","properties":{"total":{"type":"integer"},"items":{"type":"array","items":{"type":"object"}}}},"WebhookSubscribeRequest":{"type":"object","required":["url","events"],"properties":{"url":{"type":"string","format":"uri","description":"Endpoint to POST events to. Note: Only http/https protocols are allowed. Private IP ranges, localhost, and loopback addresses are blocked to prevent SSRF."},"events":{"type":"array","items":{"type":"string","enum":["fact.new","news.published","value.updated","site.update"]},"description":"Event types to subscribe to"},"secret":{"type":"string","description":"Optional HMAC-SHA256 signing secret"},"description":{"type":"string"}}},"WebhookSubscribeResponse":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time"},"status":{"type":"string"}}},"WebhookPayload":{"type":"object","properties":{"event":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"data":{"type":"object"},"source":{"type":"string"}}},"McpManifest":{"type":"object","properties":{"schema_version":{"type":"string"},"name_for_model":{"type":"string"},"tools":{"type":"array","items":{"type":"object"}}}},"McpRequest":{"type":"object","required":["name","arguments"],"properties":{"name":{"type":"string"},"arguments":{"type":"object"}}},"McpResponse":{"type":"object","properties":{"content":{"type":"array","items":{"type":"object"}},"isError":{"type":"boolean"}}}},"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Optional API key for rate-limit bypass"}}}}