{"openapi":"3.1.0","info":{"title":"Information Marketplace for Agents API","version":"1.0.0","description":"Daily data packages sold per category. Paid endpoints use x402 v2 (USDC on Base mainnet). Re-downloads use the bearer access key returned with a purchase."},"servers":[{"url":"https://informationmarketplaceforagents.online"}],"components":{"securitySchemes":{"x402":{"type":"apiKey","in":"header","name":"PAYMENT-SIGNATURE","description":"base64 x402 v2 payment payload"},"accessKey":{"type":"http","scheme":"bearer","description":"imfa_… key returned in X-Access-Key after a purchase"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"Package":{"type":"object","properties":{"package":{"type":"object","properties":{"id":{"type":"string"},"category":{"type":"string"},"date":{"type":"string","format":"date"},"version":{"type":"integer"},"record_count":{"type":"integer"},"regions":{"type":"array","items":{"type":"string"}}}},"records":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}},"paths":{"/api/v1/catalog":{"get":{"operationId":"getCatalog","summary":"All categories, prices and freshness","responses":{"200":{"description":"Catalog"}}}},"/api/v1/categories/{category}":{"get":{"operationId":"getCategory","summary":"One category with recent packages","parameters":[{"name":"category","in":"path","required":true,"schema":{"type":"string","enum":["new-projects","new-companies","government-tenders","service-requests","corporate-signals"]}},{"name":"limit","in":"query","schema":{"type":"integer","maximum":366}},{"name":"before","in":"query","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Category"},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/packages/{category}/{date}":{"get":{"operationId":"getPackageMetadata","summary":"Free package metadata","parameters":[{"name":"category","in":"path","required":true,"schema":{"type":"string","enum":["new-projects","new-companies","government-tenders","service-requests","corporate-signals"]}},{"name":"date","in":"path","required":true,"schema":{"type":"string","format":"date"},"description":"UTC calendar day"}],"responses":{"200":{"description":"Metadata"}}}},"/api/v1/packages/{category}/{date}/data":{"get":{"operationId":"getPackageData","summary":"Download a daily package (paid)","parameters":[{"name":"category","in":"path","required":true,"schema":{"type":"string","enum":["new-projects","new-companies","government-tenders","service-requests","corporate-signals"]}},{"name":"date","in":"path","required":true,"schema":{"type":"string","format":"date"},"description":"UTC calendar day"},{"name":"format","in":"query","schema":{"type":"string","enum":["json","csv"]}},{"name":"version","in":"query","schema":{"type":"integer"}}],"security":[{"x402":[]},{"accessKey":[]}],"responses":{"200":{"description":"Package data","headers":{"PAYMENT-RESPONSE":{"schema":{"type":"string"}},"X-Access-Key":{"schema":{"type":"string"}},"X-Package-Version":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Package"}},"text/csv":{"schema":{"type":"string"}}}},"402":{"description":"Payment required (x402 v2). The PAYMENT-REQUIRED header carries the base64 challenge.","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/periods/{category}":{"get":{"operationId":"quotePeriod","summary":"Quote ten consecutive days","parameters":[{"name":"category","in":"path","required":true,"schema":{"type":"string","enum":["new-projects","new-companies","government-tenders","service-requests","corporate-signals"]}},{"name":"kind","in":"query","required":true,"schema":{"type":"string","enum":["past10","future10"]}},{"name":"start","in":"query","required":true,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Quote"}}},"post":{"operationId":"buyPeriod","summary":"Buy ten consecutive days with x402","parameters":[{"name":"category","in":"path","required":true,"schema":{"type":"string","enum":["new-projects","new-companies","government-tenders","service-requests","corporate-signals"]}},{"name":"kind","in":"query","required":true,"schema":{"type":"string","enum":["past10","future10"]}},{"name":"start","in":"query","required":true,"schema":{"type":"string","format":"date"}}],"security":[{"x402":[]}],"responses":{"200":{"description":"Access key and package URLs"},"402":{"description":"Payment required (x402 v2). The PAYMENT-REQUIRED header carries the base64 challenge.","headers":{"PAYMENT-REQUIRED":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/library":{"get":{"operationId":"getLibrary","summary":"Purchases and entitled days","security":[{"accessKey":[]}],"responses":{"200":{"description":"Library"},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/feed":{"get":{"operationId":"getFeed","summary":"JSON Feed of published packages","parameters":[{"name":"category","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"JSON Feed 1.1"}}}},"/api/v1/subscriptions":{"post":{"operationId":"subscribe","summary":"Register a package.published webhook","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"},"categories":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"201":{"description":"Subscription with signing secret"}}},"delete":{"operationId":"unsubscribe","summary":"Unsubscribe with the manage token","responses":{"200":{"description":"Unsubscribed"}}}}}}