Skip to main content

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.

SurfacePackageOpenAPI 3.1 document
Native@mailwoman/api@11.0.0, served by mailwoman@11.0.0Native schema
Nominatim-compatible@mailwoman/nominatim@11.0.0Nominatim schema
Photon-compatible@mailwoman/photon@11.0.0Photon 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.0libpostal 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 pathRequest fields200 response schemaOther declared statuses
GET /v1/parseQuery address, debug, input_mode.StampedParseResponse400, 501
POST /v1/parseJSON address required; debug, input_mode optional.StampedParseResponse400, 501
POST /v1/geocodeJSON address required; bias, include_tree, input_mode optional.StampedGeocodeResponse400, 503
POST /v1/batchJSON addresses required; input_mode optional.StampedBatchResponse400, 413, 503
POST /v1/resolveJSON tree required; opts optional.StampedResolveResponse400, 503
POST /v1/formatJSON components and country required; options optional.StampedFormatResponse400
POST /v1/reloadNo request body declared.ReloadResponse503
GET /healthNo request fields declared.HealthResponseNone listed.
GET /metricsNo request fields declared.MetricsSnapshotNone 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:

json
{
"method": "POST",
"path": "/v1/geocode",
"contentType": "application/json",
"body": { "address": "1600 Pennsylvania Avenue NW, Washington, DC 20500" }
}
json
{
"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.

SurfaceMethod and pathKey input200 responseDeclared statuses
NominatimGET /searchq or structured place query fields.Nominatim result array or requested format.200, 500, 501
NominatimGET /reverselat, lon.One result or null.200, 400, 500, 501
NominatimGET /lookuposm_ids.Nominatim result array.200, 500, 501
NominatimGET /statusNone.NominatimStatus.200, 500
PhotonGET /apiq.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
PhotonGET /reverselat, 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 /parsequery 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 /parseJSON 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 /expandaddress.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 /expandJSON 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.