{"openapi":"3.1.0","info":{"title":"Macro Pulse","description":"Pay-per-call macroeconomic indicator API for AI agents, sourced from the World Bank (GDP growth, inflation, unemployment trend). Single-country lookups at $0.02, and an 8-country flat-priced batch endpoint at $0.05. Settled in USDC on Base mainnet via the x402 protocol. No signup or API key required.","contact":{"name":"Benji Ferguson","url":"https://macro-pulse-x402.onrender.com/","email":"benjiferguson@gmail.com"},"version":"1.1.0"},"paths":{"/macro-pulse/{country_code}":{"get":{"summary":"Macro Pulse","operationId":"macro_pulse_macro_pulse__country_code__get","parameters":[{"name":"country_code","in":"path","required":true,"schema":{"type":"string","title":"Country Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"head":{"summary":"Macro Pulse","operationId":"macro_pulse_macro_pulse__country_code__get","parameters":[{"name":"country_code","in":"path","required":true,"schema":{"type":"string","title":"Country Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"options":{"summary":"Macro Pulse Options","operationId":"macro_pulse_options_macro_pulse__country_code__options","parameters":[{"name":"country_code","in":"path","required":true,"schema":{"type":"string","title":"Country Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/macro-pulse-batch/{country_codes}":{"get":{"summary":"Macro Pulse Batch","description":"Higher-value bundled endpoint: many countries in one paid call.\n\nPriced flat (see BATCH_PRICE / routes below) regardless of how many\ncountries are requested (up to MAX_BATCH_COUNTRIES). Because indicator\nlookups are cached (see fetch_indicator), the marginal backend cost of\neach extra country in a batch is near zero, so this bundle earns\nmaterially more per call than the single-country endpoint while still\nundercutting what the same countries would cost as separate calls\n(up to MAX_BATCH_COUNTRIES x $0.02), giving agents a real incentive to\nuse it instead of looping the single-country endpoint.","operationId":"macro_pulse_batch_macro_pulse_batch__country_codes__get","parameters":[{"name":"country_codes","in":"path","required":true,"schema":{"type":"string","title":"Country Codes"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"head":{"summary":"Macro Pulse Batch","description":"Higher-value bundled endpoint: many countries in one paid call.\n\nPriced flat (see BATCH_PRICE / routes below) regardless of how many\ncountries are requested (up to MAX_BATCH_COUNTRIES). Because indicator\nlookups are cached (see fetch_indicator), the marginal backend cost of\neach extra country in a batch is near zero, so this bundle earns\nmaterially more per call than the single-country endpoint while still\nundercutting what the same countries would cost as separate calls\n(up to MAX_BATCH_COUNTRIES x $0.02), giving agents a real incentive to\nuse it instead of looping the single-country endpoint.","operationId":"macro_pulse_batch_macro_pulse_batch__country_codes__get","parameters":[{"name":"country_codes","in":"path","required":true,"schema":{"type":"string","title":"Country Codes"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"options":{"summary":"Macro Pulse Batch Options","operationId":"macro_pulse_batch_options_macro_pulse_batch__country_codes__options","parameters":[{"name":"country_codes","in":"path","required":true,"schema":{"type":"string","title":"Country Codes"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pay":{"get":{"summary":"Pay Page","description":"Self-serve bootstrap-payment page.\n\nLets the wallet-owning human pay this API's own endpoint once, straight\nfrom a browser-injected wallet (Base app / MetaMask), with no private\nkey ever touching this server or any script. Served from the same\norigin as the API so the in-page fetch() calls are same-origin and need\nno CORS configuration at all.","operationId":"pay_page_pay_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/x402":{"get":{"summary":"X402 Discovery Manifest","operationId":"x402_discovery_manifest__well_known_x402_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/llms.txt":{"get":{"summary":"Llms Txt","operationId":"llms_txt_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/.well-known/ai-plugin.json":{"get":{"summary":"Ai Plugin Manifest","operationId":"ai_plugin_manifest__well_known_ai_plugin_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}