{"openapi":"3.1.0","info":{"title":"Apizie","version":"2.0.0","description":"One API key, one envelope, many public data sources."},"servers":[{"url":"https://zieapi.vercel.app"}],"security":[{"ApiKeyAuth":[]}],"paths":{"/v1/open-data:citycontext/by-point":{"get":{"operationId":"open_data_citycontext_by_point","summary":"Query by coordinates (SRID 4326 - decimal degrees)","description":"GET /@{lat},{lon}","tags":["open-data"],"parameters":[{"name":"lat","in":"query","required":true,"description":"Latitude","schema":{"type":"number","description":"Latitude"}},{"name":"lon","in":"query","required":true,"description":"Longitude","schema":{"type":"number","description":"Longitude"}},{"name":"school_search_radius","in":"query","required":false,"description":"Search radius for schools, in metres, between 100 and 4000","schema":{"type":"integer","description":"Search radius for schools, in metres, between 100 and 4000"}},{"name":"park_search_radius","in":"query","required":false,"description":"Search radius for parks, in metres, between 100 and 2000","schema":{"type":"integer","description":"Search radius for parks, in metres, between 100 and 2000"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}},"/v1/open-data:citycontext/by-postcode":{"get":{"operationId":"open_data_citycontext_by_postcode","summary":"Query by postcode","description":"GET /postcodes/{postcode}","tags":["open-data"],"parameters":[{"name":"postcode","in":"query","required":true,"description":"Postcode","schema":{"type":"string","description":"Postcode"}},{"name":"school_search_radius","in":"query","required":false,"description":"Search radius for schools, in metres, between 100 and 4000","schema":{"type":"integer","description":"Search radius for schools, in metres, between 100 and 4000"}},{"name":"park_search_radius","in":"query","required":false,"description":"Search radius for parks, in metres, between 100 and 2000","schema":{"type":"integer","description":"Search radius for parks, in metres, between 100 and 2000"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}},"/v1/open-data:citycontext/usage":{"get":{"operationId":"open_data_citycontext_usage","summary":"Get usage in current month","description":"GET /usage","tags":["open-data"],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"4XX":{"$ref":"#/components/responses/Error"},"5XX":{"$ref":"#/components/responses/Error"}},"x-apizie-cache-ttl":60,"x-apizie-min-plan":null,"x-apizie-bulk":true,"x-apizie-status":"byok"}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"RunEnvelope":{"type":"object","required":["project","data","timestamp"],"properties":{"project":{"type":"string","example":"dev-tools:hash"},"data":{},"timestamp":{"type":"string","format":"date-time"}}},"ErrorEnvelope":{"type":"object","properties":{"content":{},"message":{"type":"string"},"errors":{"type":"array","items":{}},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}},"responses":{"Error":{"description":"Invalid key, plan gate, rate limit or upstream failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}