HTTP interfaces
This reference covers the four HTTP surfaces exported by the published 11.0.0 packages. Each linked OpenAPI file was emitted from its package's openapi command on 9 November 2026. Each file is a fixed 11.0.0 snapshot. The tables summarize routes and declared response statuses. Follow a schema link for complete parameterparameterA single learned number inside a model — one weight or bias. Mailwoman's encoder has roughly 30 million of them; training is the search for good values. and response fields.
| Surface | Package | OpenAPI 3.1 document |
|---|---|---|
| Native | @mailwoman/api@11.0.0, served by mailwoman@11.0.0 | Native schema |
| Nominatim-compatible | @mailwoman/nominatim@11.0.0 | Nominatim schema |
| Photon-compatible | @mailwoman/photon@11.0.0 | Photon schema |
| libpostallibpostalAn open-source C address parser used by Pelias. Mailwoman's rule-based v0 and neural classifier supersede it.-compatible | @mailwoman/libpostal@11.0.0 | libpostal schema |
Each package's server serves its own OpenAPI document at GET /openapi.json under its own base URL. The native operation paths use the /v1 prefix. The CLI reference records the checked mailwoman serve --help syntax. The published mailwoman serve command exits before listening when its preflight finds neither a candidate database nor suitable Who's On FirstWOF (Who's On First). An open-source gazetteer of places maintained by Mapzen/whosonfirst. Mailwoman builds a custom SQLite database from WOF GeoJSON repos, extended with postcode data, importance scores, and coincident-role relations. databases. Data and locales lists the data prerequisites and installation checks.
Native routes
The native schema declares these operations. A response name refers to a schema under components.schemas in the native OpenAPI document. The status column lists declared responses other than 200. Runtime faults can return additional statuses.
| Method and path | Request fields | 200 response schema | Other declared statuses |
|---|---|---|---|
GET /v1/parse | Query address, debug, input_mode. | StampedParseResponse | 400, 501 |
POST /v1/parse | JSON address required; debug, input_mode optional. | StampedParseResponse | 400, 501 |
POST /v1/geocode | JSON address required; bias, include_tree, input_mode optional. | StampedGeocodeResponse | 400, 503 |
POST /v1/batch | JSON addresses required; input_mode optional. | StampedBatchResponse | 400, 413, 503 |
POST /v1/resolve | JSON tree required; opts optional. | StampedResolveResponse | 400, 503 |
POST /v1/format | JSON components and country required; options optional. | StampedFormatResponse | 400 |
POST /v1/reload | No request body declared. | ReloadResponse | 503 |
GET /health | No request fields declared. | HealthResponse | None listed. |
GET /metrics | No request fields declared. | MetricsSnapshot | None listed. |
The parseaddress parsingThe process of decomposing a free-text postal address string into structured components — house number, street name, locality, region, postcode, and country — so a geocoder can resolve them to coordinates. response schema contains input, components, tree, and debug. The GeocodeResponse schema defines lat, lon, resolution_tier, and other coordinate and evidence fields. Result schema explains the fields at their owning interfaces. GET /health declares status and uptime_s. A successful health response reports that the HTTP app answered. It doesn't verify the presence of geocodinggeocodingThe process of converting an address into geographic coordinates (latitude and longitude). Mailwoman geocodes in a multi-tier cascade: exact address-point match → street interpolation → locality centroid. Each tier is progressively coarser but more widely available. data.
The native APIError schema requires error as a string and detail as either a string or null. The OpenAPI document assigns 400 to invalid native inputs, 413 to a batchbatch sizeHow many examples the model processes before each parameter update. Larger batches give smoother gradients but cost more memory; gradient accumulation simulates a big batch on a small GPU. over its configured cap, 501 when the app has no parseaddress parsingThe process of decomposing a free-text postal address string into structured components — house number, street name, locality, region, postcode, and country — so a geocoder can resolve them to coordinates. method configured, and 503 to unavailable geocodinggeocodingThe process of converting an address into geographic coordinates (latitude and longitude). Mailwoman geocodes in a multi-tier cascade: exact address-point match → street interpolation → locality centroid. Each tier is progressively coarser but more widely available. or resolution methods where the relevant route declares it. The schema lists no 500 response for the native operations in the table. Runtime failures may have additional status codes.
One complete error pair was observed through createMailwomanAPI({}) from published @mailwoman/api@11.0.0. The in-process app had no geocodinggeocodingThe process of converting an address into geographic coordinates (latitude and longitude). Mailwoman geocodes in a multi-tier cascade: exact address-point match → street interpolation → locality centroid. Each tier is progressively coarser but more widely available. method, and no network server or geographic database was involved:
{
"method": "POST",
"path": "/v1/geocode",
"contentType": "application/json",
"body": { "address": "1600 Pennsylvania Avenue NW, Washington, DC 20500" }
}
{
"status": 503,
"contentType": "application/json",
"body": {
"error": "geocoder not available",
"detail": "install @mailwoman/neural + @mailwoman/resolver-wof-sqlite and provide gazetteer data (MAILWOMAN_WOF_DB / MAILWOMAN_CANDIDATE_DB)"
}
}
Run the Mailwoman HTTP server shows data-backed responses from a server started with installed data.
Compatibility routes
The published compatibility documents declare these routes. The key input column identifies the parameterparameterA single learned number inside a model — one weight or bias. Mailwoman's encoder has roughly 30 million of them; training is the search for good values. used to choose an operation. Each linked schema lists the complete optional parametersparameterA single learned number inside a model — one weight or bias. Mailwoman's encoder has roughly 30 million of them; training is the search for good values. and response fields. The response status column includes 200 and the other statuses declared by that route.
| Surface | Method and path | Key input | 200 response | Declared statuses |
|---|---|---|---|---|
| Nominatim | GET /search | q or structured place query fields. | Nominatim result array or requested format. | 200, 500, 501 |
| Nominatim | GET /reverse | lat, lon. | One result or null. | 200, 400, 500, 501 |
| Nominatim | GET /lookup | osm_ids. | Nominatim result array. | 200, 500, 501 |
| Nominatim | GET /status | None. | NominatimStatus. | 200, 500 |
| Photon | GET /api | q. | PhotonResponse featurefeatureAn input signal a model conditions on. Beyond the raw tokens, Mailwoman feeds soft features — gazetteer-membership channels and the postcode anchor — that inform predictions without overriding them. collection. | 200, 400, 500, 501 |
| Photon | GET /reverse | lat, lon. | PhotonResponse featurefeatureAn input signal a model conditions on. Beyond the raw tokens, Mailwoman feeds soft features — gazetteer-membership channels and the postcode anchor — that inform predictions without overriding them. collection. | 200, 400, 500, 501 |
| libpostallibpostalAn open-source C address parser used by Pelias. Mailwoman's rule-based v0 and neural classifier supersede it. | GET /parse | query or address. | Ordered component array. | 200, 400, 500 |
| libpostallibpostalAn open-source C address parser used by Pelias. Mailwoman's rule-based v0 and neural classifier supersede it. | POST /parse | JSON query or address. | Ordered component array. | 200, 400, 500 |
| libpostallibpostalAn open-source C address parser used by Pelias. Mailwoman's rule-based v0 and neural classifier supersede it. | GET /expand | address. | ExpandResponse. | 200, 400, 500, 501 |
| libpostallibpostalAn open-source C address parser used by Pelias. Mailwoman's rule-based v0 and neural classifier supersede it. | POST /expand | JSON address. | ExpandResponse. | 200, 400, 500, 501 |
Each compatibility document also declares GET / as an HTML landing page with status 200. The Nominatim and libpostallibpostalAn open-source C address parser used by Pelias. Mailwoman's rule-based v0 and neural classifier supersede it. error schemas require an error string. Photon uses a featurefeatureAn input signal a model conditions on. Beyond the raw tokens, Mailwoman feeds soft features — gazetteer-membership channels and the postcode anchor — that inform predictions without overriding them. collection with required type, features, and message fields for its declared error responses. These are schema declarations. No live compatibility response was executed for this page. The packages' route handlers read compatibility query parametersparameterA single learned number inside a model — one weight or bias. Mailwoman's encoder has roughly 30 million of them; training is the search for good values. through their own request adapters, so the OpenAPI parameterparameterA single learned number inside a model — one weight or bias. Mailwoman's encoder has roughly 30 million of them; training is the search for good values. lists describe the documented interface rather than every possible spelling a handler may accept.
Versioned and current OpenAPI files
The versioned JSON files were generated from published npm packages with openapi --out. The site's ordinary /openapi/*.json files are rebuilt from the current checkout and can change after this release. The versioned files keep the checked 11.0.0 schemas available as the route definitions change. The published native routes, Nominatim routes, Photon routes, and libpostal routes define the handlers behind the schemas.