Address parser template
- Node.js
- Express
Split a one-line US address into street number, street, city, state and ZIP.
A Node.js and Express app that turns a US address typed on one line into clean, separate fields: street number, street name, street type, direction, city, state and ZIP. Paste an address, or try one of the examples, and see each part. Use it to fill in checkout forms or clean up imported addresses.

What it does
- Every part of the address
- Returns the street number, name, type (Ave, St), direction (NW), city, state and ZIP as separate fields.
- Works on messy input
- Takes the address the way people type it, on one line with commas or without.
- Keeps your key private
- The page calls your own server, which holds the key and limits each visitor to 10 requests a minute.
How it works
The route that parses an address.
// GET /api/parse?address=
app.get('/api/parse', async (req, res) => {
const address = str(req.query.address, 300);
if (!address) return res.status(400).json({ status: 'error', error: 'Enter an address.' });
try {
const data = await callApi('streetaddressparser', { query: { address } });
res.json({ status: 'ok', error: null, data });
} catch (err) {
res.status(err.status || 502).json({ status: 'error', error: err.message });
}
});Deploy it
- Get a free API key
The free plan includes 200 credits a month, no card needed. Create your key.
- Deploy it
Click Deploy to Vercel. Vercel copies the repo to your GitHub account and asks for
APIVERVE_API_KEY: paste your key there. - Open your app
Vercel builds it and gives you a live URL, usually in about a minute. Every push to the repo redeploys it.
Try the Street Address Parser API — the call this template makes
No key required to try it. Get a key to use it in your app.
{
"status": "ok",
"error": null,
"data": {
"address": "1600 Amphitheatre Parkway, Mountain View, CA 90210",
"parsed": {
"streetNumber": "1600",
"streetType": "Pkwy",
"streetAddress": "Amphitheatre",
"cityName": "Mountain View",
"stateName": "CA",
"zipCode": "90210"
}
}
}