NorthMock · Developer API
Address Generator API for US & Canadian Test Data
Request one region-aware test record as JSON, with separate postal fields, a generated name, disposable inbox access, reserved phone formats, and an optional exact US ZIP or NYC filter.
Free random address generator API endpoint
NorthMock exposes a read-only endpoint for development, automated QA, test fixtures, demos, and staging environments. It requires no API key, accepts cross-origin browser requests, and returns one record per request.
/api/generateQuick request
curl "https://us.chatgpt.org.uk/api/generate?state=CA"
Leave state empty for a random supported US or Canadian region. Send a two-letter region code when the test must stay in one state, province, or territory.
Query parameters
| Parameter | Required | Accepted value | Behavior |
|---|---|---|---|
state | No | Supported two-letter US or Canadian region code | Reads only that regional address pool; examples include CA, NY, ON, and BC. |
city | No | Supported city ID; currently nyc | Restricts New York results to documented five-borough ZIP groups. A supplied state must match the city; use the random NYC address generator for the interactive version. |
zip | No | Exactly five digits | Requires a US state or city scope and returns only a record whose parsed base ZIP matches exactly. |
California record
GET /api/generate?state=CANew York City record
GET /api/generate?state=NY&city=nycExact Ohio ZIP
GET /api/generate?state=OH&zip=43215Canadian province
GET /api/generate?state=ONJavaScript and Python examples
Browser or Node.js fetch
const response = await fetch('https://us.chatgpt.org.uk/api/generate?state=OH&zip=43215', {
headers: { Accept: 'application/json' }
});
if (!response.ok) {
const failure = await response.json();
throw new Error(failure.error.message);
}
const { data, meta } = await response.json();
console.log(data.addressLine, data.locality, data.state, data.postalCode);
Python standard library
import json
from urllib.request import Request, urlopen
url = 'https://us.chatgpt.org.uk/api/generate?state=ON'
request = Request(url, headers={'Accept': 'application/json'})
with urlopen(request) as response:
payload = json.load(response)
print(payload['data']['address'])
JSON response fields
The endpoint returns a data object for the generated record and a meta object describing generation time, intended use, name sources, and safe-phone policy. The abbreviated example uses bracketed placeholders instead of publishing a source address or a generated identity in indexable HTML.
{
"data": {
"address": "[selected address], Los Angeles, CA 90001, United States",
"addressLine": "[selected street line]",
"locality": "Los Angeles",
"postalCode": "90001",
"name": "[generated name]",
"gender": "Female",
"email": "[generated mailbox]@gravityengine.cc",
"inboxUrl": "https://mail.chatgpt.org.uk/[generated mailbox]@gravityengine.cc",
"phone": "(213) 555-0100",
"phoneInternational": "+1 213-555-0100",
"phoneE164": "+12135550100",
"phoneAssignedPrefix": "(213) 234-XXXX",
"state": "CA",
"country": "US",
"region": {
"code": "CA",
"name": "California",
"country": "US",
"countryName": "United States",
"path": "/us/california-address-generator/"
},
"city": null,
"filters": {
"city": null,
"zipCode": null
}
},
"meta": {
"generatedAt": "2026-08-12T00:00:00.000Z",
"intendedUse": "development-and-testing"
}
}
| Field group | Important properties | Use |
|---|---|---|
| Address | address, addressLine, locality, state, postalCode, country | Map directly to checkout, CRM, profile, or database fields. |
| Contact | name, gender, email, inboxUrl | Use independently assembled test contact values and open the disposable inbox in a new tab. |
| Safe phone | phone, phoneInternational, phoneE164 | Exercise local, formatted international, and strict E.164 fields with a reserved 555-01XX line. |
| Assigned prefix | phoneAssignedPrefix, phoneAssignedPrefixInternational | Preview an official local NPA-NXX while keeping subscriber digits masked. |
| Scope | region, city, filters | Assert which regional, city, or ZIP filter produced the fixture. |
Error responses and status codes
Failures use a consistent { "error": { "code", "message" } } body. Generated responses are never cached; clients should handle status codes before reading data.
| HTTP | Code | Meaning |
|---|---|---|
| 400 | INVALID_REGION, INVALID_CITY, CITY_REGION_MISMATCH | The requested geographic scope is unsupported or inconsistent. |
| 400 | INVALID_ZIP, ZIP_REQUIRES_REGION, ZIP_REGION_UNSUPPORTED | The ZIP input is malformed, lacks a state, or targets a Canadian region. |
| 404 | ZIP_NOT_AVAILABLE | No fixture in the selected state pool matches that exact ZIP. |
| 405 | METHOD_NOT_ALLOWED | Use GET or an OPTIONS CORS preflight. |
| 429 | RATE_LIMITED | The current rate-limit key exceeded 120 requests in 60 seconds; respect Retry-After. |
| 503 | ADDRESS_DATA_UNAVAILABLE | The selected regional R2 data is temporarily unavailable. |
CORS, caching, batching, and responsible use
- CORS:
GETandOPTIONSare supported. The production endpoint currently allows cross-origin requests. - Caching: generated records use
Cache-Control: no-store. The descriptive/api/index may be cached briefly. - Batching: the endpoint returns one record. Use the browser generator for deduplicated batches of up to 25 and local CSV or JSON export.
- Address boundary: an address may describe a real place, but the generated name, mailbox, and safe phone are assembled independently and do not identify an occupant.
- Permitted use: use records only for development, QA, education, demos, and staging—not physical mail, residency claims, impersonation, fraud, or bypassing identity checks.
See the NorthMock data methodology for source and validation boundaries, or the bulk address test-data guide for browser export fields.
Address generator API questions
Is an API key required?
No. The endpoint is public and rate limited. Do not send credentials or personal data in query parameters.
Can the API return a specific ZIP code?
Yes for US regions. Send a two-letter state plus an exact five-digit zip. The endpoint returns 404 when the current regional pool has no matching fixture.
Can it generate Canadian postal-code records?
Yes. Select a Canadian province or territory with state. Exact postal-code filtering is not currently exposed.
Where is the formal API contract?
The OpenAPI 3.1 document describes parameters, response schemas, and error bodies for client generation and contract tests.