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.

API version 1.3.0 · Documentation reviewed August 12, 2026

Open the OpenAPI 3.1 schema

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.

MethodGET
Endpoint/api/generate
FormatJSON
AuthenticationNone
CORSEnabled
Rate limit120 requests / 60 seconds

Quick 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

ParameterRequiredAccepted valueBehavior
stateNoSupported two-letter US or Canadian region codeReads only that regional address pool; examples include CA, NY, ON, and BC.
cityNoSupported city ID; currently nycRestricts 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.
zipNoExactly five digitsRequires a US state or city scope and returns only a record whose parsed base ZIP matches exactly.

California record

GET /api/generate?state=CA

New York City record

GET /api/generate?state=NY&city=nyc

Exact Ohio ZIP

GET /api/generate?state=OH&zip=43215

Canadian province

GET /api/generate?state=ON

JavaScript 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 groupImportant propertiesUse
Addressaddress, addressLine, locality, state, postalCode, countryMap directly to checkout, CRM, profile, or database fields.
Contactname, gender, email, inboxUrlUse independently assembled test contact values and open the disposable inbox in a new tab.
Safe phonephone, phoneInternational, phoneE164Exercise local, formatted international, and strict E.164 fields with a reserved 555-01XX line.
Assigned prefixphoneAssignedPrefix, phoneAssignedPrefixInternationalPreview an official local NPA-NXX while keeping subscriber digits masked.
Scoperegion, city, filtersAssert 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.

HTTPCodeMeaning
400INVALID_REGION, INVALID_CITY, CITY_REGION_MISMATCHThe requested geographic scope is unsupported or inconsistent.
400INVALID_ZIP, ZIP_REQUIRES_REGION, ZIP_REGION_UNSUPPORTEDThe ZIP input is malformed, lacks a state, or targets a Canadian region.
404ZIP_NOT_AVAILABLENo fixture in the selected state pool matches that exact ZIP.
405METHOD_NOT_ALLOWEDUse GET or an OPTIONS CORS preflight.
429RATE_LIMITEDThe current rate-limit key exceeded 120 requests in 60 seconds; respect Retry-After.
503ADDRESS_DATA_UNAVAILABLEThe selected regional R2 data is temporarily unavailable.

CORS, caching, batching, and responsible use

  • CORS: GET and OPTIONS are 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.