Demo API
Keyless, rate-limited endpoints for the marketing site demo. Simulated data only.
/demo/autocomplete
Website demo endpoint (no key, simulated data only)
Local prototype · simulated data
Authentication
No API key. Requests must come from an allowed website origin and are rate-limited per client.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
q | query | string | Yes | Partial address typed by the user. min length 2 · max length 100 |
limit | query | integer | No | min 1 · max 10 · default 5 |
Responses
- 200 Suggestions. —
SuggestionList - 400 Invalid parameters. —
Error - 403 Key not allowed for this Origin or endpoint. —
Error - 429 Rate limit exceeded. —
Error
Response fields (200)
| Field | Type | Required | Description |
|---|---|---|---|
data | array of object | Yes | max 10 items |
data[].id | string | Yes | pattern |
data[].label | string | Yes | |
data[].street_line | string | Yes | |
data[].secondary | string | null | Yes | |
data[].city | string | Yes | |
data[].state | string | Yes | min length 2 · max length 2 |
data[].zip | string | Yes | pattern |
data[].has_secondaries | boolean | Yes | |
data[].secondary_count | integer | Yes | min 0 |
meta | object | Yes | |
meta.request_id | string | Yes | |
meta.source | enum: "simulated", "live" | Yes |
|
meta.billable | boolean | Yes | Always |
Example
curl "http://localhost:8787/demo/autocomplete?q=1600+penn&limit=3" \
-H "Origin: http://localhost:8787"
// Browser code on an allowed origin. The browser sends the Origin header itself.
const res = await fetch("http://localhost:8787/demo/autocomplete?q=1600+penn&limit=3");
const body = await res.json();
if (!res.ok) throw new Error(body.error.code);
Response 200 from the local prototype (simulated data):
{
"data": [
{
"id": "sug_5c363e6655b1",
"label": "1600 Pennsylvania Ave NW, Washington, DC 20500",
"street_line": "1600 Pennsylvania Ave NW",
"secondary": null,
"city": "Washington",
"state": "DC",
"zip": "20500",
"has_secondaries": false,
"secondary_count": 0
}
],
"meta": {
"request_id": "req_0000000000000000docs",
"source": "simulated",
"billable": false
}
}
/demo/addresses/{id}
Website demo selection endpoint (no key, simulated data only)
Local prototype · simulated data
Authentication
No API key. Requests must come from an allowed website origin and are rate-limited per client.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | pattern |
secondary | query | string | No | max length 20 |
Responses
- 200 The selected address. —
AddressDetail - 400 Invalid parameters. —
Error - 403 Key not allowed for this Origin or endpoint. —
Error - 404 Resource not found. —
Error - 429 Rate limit exceeded. —
Error
Response fields (200)
| Field | Type | Required | Description |
|---|---|---|---|
data | object | Yes | |
data.id | string | Yes | |
data.street_line | string | Yes | |
data.city | string | Yes | |
data.state | string | Yes | |
data.zip | string | Yes | |
data.secondaries | array of string | Yes | Units in the building (empty when there are none). |
meta | object | Yes | |
meta.request_id | string | Yes | |
meta.source | enum: "simulated", "live" | Yes |
|
meta.billable | boolean | Yes | Always |
Example
curl "http://localhost:8787/demo/addresses/sug_5c363e6655b1" \
-H "Origin: http://localhost:8787"
// Browser code on an allowed origin. The browser sends the Origin header itself.
const res = await fetch("http://localhost:8787/demo/addresses/sug_5c363e6655b1");
const body = await res.json();
if (!res.ok) throw new Error(body.error.code);
Response 200 from the local prototype (simulated data):
{
"data": {
"id": "sug_5c363e6655b1",
"street_line": "1600 Pennsylvania Ave NW",
"city": "Washington",
"state": "DC",
"zip": "20500",
"secondaries": []
},
"meta": {
"request_id": "req_0000000000000000docs",
"source": "simulated",
"billable": false
}
}