{"openapi":"3.1.0","info":{"title":"@mailwoman/photon","version":"7.8.1","description":"Photon drop-in — a Photon-compatible autocomplete/type-ahead geocoding API (GeoJSON FeatureCollection over /api + /reverse) on the Mailwoman engine. Run it with `npx @mailwoman/photon serve`.","license":{"name":"AGPL-3.0-only OR LicenseRef-Commercial","identifier":"AGPL-3.0-only"},"contact":{"name":"Sister Software","url":"https://mailwoman.sister.software"}},"externalDocs":{"description":"Switching from Photon","url":"https://mailwoman.sister.software/docs/concepts/switching-from-photon"},"servers":[{"url":"http://{host}:{port}","variables":{"host":{"default":"127.0.0.1"},"port":{"default":"2322"}}}],"tags":[{"name":"geocoding","description":"Forward autocomplete and reverse geocoding."},{"name":"meta","description":"Health and deploy-time operations."}],"security":[],"components":{"schemas":{"PhotonResponse":{"anyOf":[{"$ref":"#/components/schemas/PhotonFeatureCollection"},{"type":"array","items":{"$ref":"#/components/schemas/SchemaOrgPlace"}}]},"PhotonFeatureCollection":{"type":"object","properties":{"type":{"type":"string","enum":["FeatureCollection"]},"features":{"type":"array","items":{"$ref":"#/components/schemas/PhotonFeature"}}},"required":["type","features"]},"PhotonFeature":{"type":"object","properties":{"type":{"type":"string","enum":["Feature"]},"geometry":{"$ref":"#/components/schemas/PointGeometry"},"properties":{"$ref":"#/components/schemas/PhotonProperties"}},"required":["type","geometry","properties"]},"PointGeometry":{"type":"object","properties":{"type":{"type":"string","enum":["Point"]},"coordinates":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]}},"required":["type","coordinates"]},"PhotonProperties":{"type":"object","properties":{"osm_id":{"anyOf":[{"type":"number"},{"type":"string"}]},"osm_type":{"type":"string"},"osm_key":{"type":"string"},"osm_value":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"housenumber":{"type":"string"},"street":{"type":"string"},"postcode":{"type":"string"},"city":{"type":"string"},"district":{"type":"string"},"county":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"countrycode":{"type":"string"},"extent":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}]}},"additionalProperties":{}},"SchemaOrgPlace":{"type":"object","properties":{"@context":{"type":"string","enum":["https://schema.org"]},"@type":{"type":"string","enum":["Place"]},"name":{"type":"string"},"geo":{"$ref":"#/components/schemas/SchemaOrgGeoCoordinates"},"address":{"$ref":"#/components/schemas/SchemaOrgPostalAddress"}},"required":["@context","@type"]},"SchemaOrgGeoCoordinates":{"type":"object","properties":{"@type":{"type":"string","enum":["GeoCoordinates"]},"latitude":{"type":"number"},"longitude":{"type":"number"}},"required":["@type","latitude","longitude"]},"SchemaOrgPostalAddress":{"type":"object","properties":{"@type":{"type":"string","enum":["PostalAddress"]},"streetAddress":{"type":"string"},"postOfficeBoxNumber":{"type":"string"},"addressLocality":{"type":"string"},"addressRegion":{"type":"string"},"postalCode":{"type":"string"},"addressCountry":{"type":"string"}},"required":["@type"]},"PhotonMessageCollection":{"type":"object","properties":{"type":{"type":"string","enum":["FeatureCollection"]},"features":{"type":"array","items":{"$ref":"#/components/schemas/PhotonFeature"}},"message":{"type":"string"}},"required":["type","features","message"]}},"parameters":{}},"paths":{"/":{"get":{"operationId":"getRoot","summary":"Landing page","tags":["meta"],"responses":{"200":{"description":"HTML landing page.","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api":{"get":{"operationId":"search","summary":"Forward / autocomplete geocoding","tags":["geocoding"],"parameters":[{"schema":{"type":"string","description":"The query string to search for."},"required":false,"description":"The query string to search for.","name":"q","in":"query"},{"schema":{"type":"integer","description":"Maximum results (default 15)."},"required":false,"description":"Maximum results (default 15).","name":"limit","in":"query"},{"schema":{"type":"string","description":"Preferred language."},"required":false,"description":"Preferred language.","name":"lang","in":"query"},{"schema":{"type":"number","description":"Location-bias latitude."},"required":false,"description":"Location-bias latitude.","name":"lat","in":"query"},{"schema":{"type":"number","description":"Location-bias longitude."},"required":false,"description":"Location-bias longitude.","name":"lon","in":"query"},{"schema":{"type":"array","items":{"type":"string"},"description":"OSM tag filter; repeatable."},"required":false,"description":"OSM tag filter; repeatable.","name":"osm_tag","in":"query"},{"schema":{"type":"array","items":{"type":"string"},"description":"Layer filter; repeatable."},"required":false,"description":"Layer filter; repeatable.","name":"layer","in":"query"},{"schema":{"type":"string","enum":["geojson","jsonld"],"description":"Output format."},"required":false,"description":"Output format.","name":"format","in":"query"}],"responses":{"200":{"description":"A GeoJSON FeatureCollection (or schema.org Place[] when format=jsonld).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhotonResponse"}}}},"400":{"description":"A required or malformed parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhotonMessageCollection"}}}},"500":{"description":"An unexpected engine fault. An empty FeatureCollection with a message, never a crash.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhotonMessageCollection"}}}},"501":{"description":"The backing engine method is not wired for this deployment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhotonMessageCollection"}}}}}}},"/reverse":{"get":{"operationId":"reverse","summary":"Reverse geocoding","tags":["geocoding"],"parameters":[{"schema":{"type":"number","description":"Latitude."},"required":false,"description":"Latitude.","name":"lat","in":"query"},{"schema":{"type":"number","description":"Longitude."},"required":false,"description":"Longitude.","name":"lon","in":"query"},{"schema":{"type":"integer","description":"Maximum results (default 15)."},"required":false,"description":"Maximum results (default 15).","name":"limit","in":"query"},{"schema":{"type":"string","description":"Preferred language."},"required":false,"description":"Preferred language.","name":"lang","in":"query"},{"schema":{"type":"number","description":"Search radius in km."},"required":false,"description":"Search radius in km.","name":"radius","in":"query"},{"schema":{"type":"string","enum":["geojson","jsonld"],"description":"Output format."},"required":false,"description":"Output format.","name":"format","in":"query"}],"responses":{"200":{"description":"A GeoJSON FeatureCollection (or schema.org Place[] when format=jsonld).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhotonResponse"}}}},"400":{"description":"A required or malformed parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhotonMessageCollection"}}}},"500":{"description":"An unexpected engine fault. An empty FeatureCollection with a message, never a crash.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhotonMessageCollection"}}}},"501":{"description":"The backing engine method is not wired for this deployment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhotonMessageCollection"}}}}}}}},"webhooks":{}}
