Oscar Property API
Look up a property by address. Get our measurements of it, and a map of the property with those areas highlighted to show on your own website.
Guide
Get a key and make your first call. The rules here apply to every route.
Getting started
-
Create an API key. In Oscar, open Company → API keys and create a key. A company admin or head can do this. Copy the key: it is shown once. If your company has no admin in Oscar, ask Oscar support for a key.
-
Call the API from your server. Send the key in the
Authorizationheader. Start with GET /coverage to see your ZIP codes, then GET /property for a property. Each route has examples in curl, Node.js and Python, which read the key from theOSCAR_API_KEYenvironment variable. -
Show the map. Put
embed.urlfrom the response in an iframe on your page:<iframe src="EMBED_URL" width="640" height="420" title="Property map"></iframe>If you add a
sandboxattribute, includeallow-scripts allow-same-origin. Withoutallow-same-originthe map cannot load.
API keys
- Keep keys on your server. Never put a key in a web page or an app.
- A key can only access properties in your company's allotted ZIP codes.
- Revoke a key on the same page. It stops working at once, and so do the map links it made.
- A key works only on
https://api.dev.oscardata.com.
Rate limits
| Limit | Counts | Over the limit |
|---|---|---|
| 60 requests a minute | Each API key, for each route | 429 with a
Retry-After header: the number of seconds to wait. |
| 300 requests a minute | Each IP address | 429 without Retry-After. |
| 120 loads a minute | Each map link (embed.url) |
The map shows an error and sends an error message with
status: 429. |
Plan for 60 requests a minute per key for each route. Do not depend on getting more.
Handling a 429
- If the response has
Retry-After, wait that many seconds, then send the same request again. - If it has no
Retry-After, wait 1 second, then 2, then 4, and so on, up to 30 seconds. Add a random part to each wait, so that your servers do not all try again at the same time. - Try again on
429and503only. Other errors do not go away when you try again: fix the request. - Stop after a few tries and show your user a message.
# --retry tries again on 429 and 503, and waits for Retry-After.
curl -G https://api.dev.oscardata.com/api/v1/property \
--retry 4 --retry-max-time 60 \
-H "Authorization: Bearer $OSCAR_API_KEY" \
-d property_id=PROPERTY_ID \
-d fields=lawn
async function getProperty(params, tries = 5) {
const url = `https://api.dev.oscardata.com/api/v1/property?${new URLSearchParams(params)}`;
for (let attempt = 1; ; attempt++) {
const res = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.OSCAR_API_KEY}` },
});
const retry = res.status === 429 || res.status === 503;
if (!retry || attempt === tries) {
if (!res.ok) throw new Error(`Oscar API returned ${res.status}`);
return res.json();
}
const retryAfter = Number(res.headers.get("Retry-After"));
const backoff = Math.min(30, 2 ** (attempt - 1)) * (0.5 + Math.random());
const seconds = retryAfter > 0 ? retryAfter : backoff;
await new Promise((resolve) => setTimeout(resolve, seconds * 1000));
}
}
import os
import random
import time
import requests
def get_property(params, tries=5):
for attempt in range(1, tries + 1):
res = requests.get(
"https://api.dev.oscardata.com/api/v1/property",
headers={"Authorization": f"Bearer {os.environ['OSCAR_API_KEY']}"},
params=params,
timeout=10,
)
if res.status_code not in (429, 503) or attempt == tries:
res.raise_for_status()
return res.json()
retry_after = res.headers.get("Retry-After", "")
if retry_after.isdigit():
seconds = int(retry_after)
else:
seconds = min(30, 2 ** (attempt - 1)) * random.uniform(0.5, 1.5)
time.sleep(seconds)
Staying under the limits
- Store
property_idafter the first lookup, and send it next time instead ofaddress. - Call the API when your user asks for a property, not on every page view.
- An
embed.urlworks for one hour. Reuse it in that hour instead of asking for a new one. - For a batch job, send at most one request a second per key.
Errors
An error returns an HTTP status and a JSON body with detail. Usually
detail is a sentence; for some errors it is an object with a
code you can check and a message:
{ "detail": "Invalid API key" }
{ "detail": { "code": "account_archived", "message": "Your company's Oscar account is archived." } }
These can come from any route. Each route lists its own errors too.
| Status | Meaning |
|---|---|
401 | The API key is missing, wrong or revoked. |
403 | Your company's Oscar account is
archived (account_archived). |
429 | Too many requests. Wait, then try again. See Rate limits. |
503 | A service we depend on is not available. Try again later. |
Routes
Each route: what you send, what comes back, and its own errors.
GET /coverage
The ZIP codes your company has, and for each one, the fields
and layers we have. Use it to check what you can ask
GET /property for, without opening Oscar. It takes only the
Authorization header: no parameters, no body. Other companies' ZIP codes
never appear here. To add a ZIP code, contact Oscar support.
curl https://api.dev.oscardata.com/api/v1/coverage \
-H "Authorization: Bearer $OSCAR_API_KEY"
// Node.js 18 or later, as an ES module.
const res = await fetch("https://api.dev.oscardata.com/api/v1/coverage", {
headers: { Authorization: `Bearer ${process.env.OSCAR_API_KEY}` },
});
if (!res.ok) throw new Error(`Oscar API returned ${res.status}`);
const coverage = await res.json();
# pip install requests
import os
import requests
res = requests.get(
"https://api.dev.oscardata.com/api/v1/coverage",
headers={"Authorization": f"Bearer {os.environ['OSCAR_API_KEY']}"},
timeout=10,
)
res.raise_for_status()
coverage = res.json()
The response:
{
"zip_codes": {
"10001": {
"properties": 5200,
"fields": ["lawn", "canopy", "buildings", "overhang"],
"layers": ["lawn", "canopy", "buildings", "overhang", "property"]
},
"10002": {
"properties": 3100,
"fields": ["canopy", "buildings", "overhang"],
"layers": ["canopy", "buildings", "overhang", "property"]
}
}
}
| Field | Description |
|---|---|
zip_codesobject |
Your company's ZIP codes, in order. Each key is a ZIP code, as a string (for example "02108"), and its value says what we have there. To check one ZIP code, read zip_codes["10001"]: it is missing when your company does not have that ZIP code. |
propertiesinteger |
How many properties in the ZIP code your company can look up that we have measurements for. |
fieldsarray of strings |
The names you can send in fields for properties in this ZIP code. One property can still have no measurement for a name: then not_measured lists it. |
layersarray of strings |
The names you can send in layers for properties in this ZIP code. property is always here. |
This route returns only the errors every route can return.
GET /property
One property: the measurements you ask for in fields, and a map link
for the layers you ask for in layers.
Request
This route takes a header and query parameters. It has no path parameters and no body.
Headers
| Name | Description |
|---|---|
Authorizationrequired |
Bearer and your API key: Authorization: Bearer osk_….
See API keys. |
Query parameters
Give exactly one of address or property_id, and at least one
of fields or layers.
| Name | Description |
|---|---|
addressstring |
A US street address, for example
123 Example Street, Anytown, NY 10001. |
property_idstring |
property_id from an earlier response. |
fieldsstring |
Comma-separated measurements to return. Available: lawn,
canopy, buildings, overhang. See
Fields. |
layersstring |
Comma-separated layers for the map. Available: lawn,
canopy, buildings, overhang,
property. See Layers. |
unitsstring |
Units for areas: sqft (default) or m2. |
Fields
fields chooses which measurements come back as JSON data in the response
body. Each name you send comes back as its own object in metrics:
{
...
"metrics": {
"FIELD_NAME": { /* the field's properties, listed below */ }
}
}
If we have no measurement for a name, it is left out of metrics and listed
in not_measured, and the other names still come back. If we have no
measurement for anything you asked for, the request fails with
422.
We add fields over time. These are available today.
lawn
| Response property | Description |
|---|---|
areanumber |
The lawn area of the property, in unit: the property minus buildings, driveways, sidewalks and other paving, minus ground deep under tree canopy. Grass under small trees and under the outer 1 m of larger canopy still counts. Whole square feet, or square metres to one decimal place. |
unitstring |
The unit of area: sqft (square feet) or m2 (square metres). It is what you sent in units, or sqft if you did not send units. |
percent_of_propertynumber |
How much of the property is lawn, as a percent from 0 to 100, to one decimal place. For example, 38.5 means the lawn covers 38.5 % of the property's area. |
canopy
| Response property | Description |
|---|---|
areanumber |
The tree canopy area of the property, in unit: the ground that trees and tall shrubs cover, seen from above. It includes canopy that hangs over buildings. Whole square feet, or square metres to one decimal place. |
unitstring |
The unit of area: sqft (square feet) or m2 (square metres). It is what you sent in units, or sqft if you did not send units. |
percent_of_propertynumber |
How much of the property is under tree canopy, as a percent from 0 to 100, to one decimal place. |
buildings
A property with no buildings has a count of 0.
| Response property | Description |
|---|---|
areanumber |
The area the buildings on the property cover (their footprints), in unit. Whole square feet, or square metres to one decimal place. |
unitstring |
The unit of area: sqft (square feet) or m2 (square metres). It is what you sent in units, or sqft if you did not send units. |
countinteger |
How many buildings are on the property. |
overhang
Where tree canopy hangs over a roof.
| Response property | Description |
|---|---|
areanumber |
The roof area that tree canopy hangs over, in unit. 0 when no canopy is over a roof. Whole square feet, or square metres to one decimal place. |
unitstring |
The unit of area: sqft (square feet) or m2 (square metres). It is what you sent in units, or sqft if you did not send units. |
Layers
layers chooses what the map shows. Layers do not come back as data: they
are drawn on the map. When you send layers, the response has
embed, a link to a map of the property with those layers on it. See
Embedded map. To get a measurement as data, use
Fields.
A layer we have no measurement for is left off the map and listed in
not_measured. property is always available.
We add layers over time. These are available today.
lawn
The lawn, as a filled lime-green area.
canopy
The tree canopy, as a filled dark-green area.
buildings
The building footprints, as filled indigo areas, drawn over the canopy.
overhang
Where tree canopy hangs over a roof, as a filled red area, drawn over the buildings. A property with no overhang shows nothing for this layer.
property
The property boundary, as a magenta outline. It can include the strip of land out to the road.
Example request
An address lookup for the lawn, as data and on the map.
curl -G https://api.dev.oscardata.com/api/v1/property \
-H "Authorization: Bearer $OSCAR_API_KEY" \
--data-urlencode "address=123 Example Street, Anytown, NY 10001" \
-d fields=lawn \
-d layers=lawn,property
// Node.js 18 or later, as an ES module.
const params = new URLSearchParams({
address: "123 Example Street, Anytown, NY 10001",
fields: "lawn",
layers: "lawn,property",
});
const res = await fetch(`https://api.dev.oscardata.com/api/v1/property?${params}`, {
headers: { Authorization: `Bearer ${process.env.OSCAR_API_KEY}` },
});
if (!res.ok) throw new Error(`Oscar API returned ${res.status}`);
const result = await res.json();
# pip install requests
import os
import requests
res = requests.get(
"https://api.dev.oscardata.com/api/v1/property",
headers={"Authorization": f"Bearer {os.environ['OSCAR_API_KEY']}"},
params={
"address": "123 Example Street, Anytown, NY 10001",
"fields": "lawn",
"layers": "lawn,property",
},
timeout=10,
)
res.raise_for_status()
result = res.json()
Response
Body
A JSON object. property_id and matched_address always come
back. The other sections come back only when you ask for them, as each row says. For the
example request
(address=…&fields=lawn&layers=lawn,property):
{
"property_id": "3f9c2a51-7d4e-4b8a-9c1f-2e6d8b0a4c17",
"matched_address": "123 EXAMPLE ST, Anytown, NY 10001",
"match": { "quality": "exact", "reasons": [] },
"metrics": {
"lawn": {
"area": 5200,
"unit": "sqft",
"percent_of_property": 38.5
}
},
"embed": {
"url": "https://dev.oscardata.com/embed/3f9c2a51-…?t=…",
"expires_at": "2026-10-06T17:00:00Z"
}
}
| Field | Description |
|---|---|
property_idstring (UUID) |
Our ID for the property. It never changes for the same property. Store it and send it as property_id next time: you get the same property back, without an address lookup. |
matched_addressstring |
The property's address in our records, for example 123 EXAMPLE ST, Anytown, NY 10001. It can be written differently from the address you sent (capitals, abbreviations, town name). Show it to your user so they can check we found the right property. |
matchobject |
How well the address you sent matches the property we found. Only when you send address, not property_id. |
match.qualitystring |
exact or approximate. With exact, every check passed. With approximate, ask your user to confirm the property. See Match quality. |
match.reasonsarray of strings |
The checks that failed, for example ["number_mismatch"]. Empty when match.quality is exact. See Match reasons for each value. |
metricsobject |
The measurements you asked for in fields, one object for each name we have a measurement for. Only when we have at least one. Each field in Fields lists the properties of its object. |
not_measuredarray of strings |
The names in fields and layers that we have no measurement for, for example ["lawn"]. They are not in metrics and not on the map. Only when there is at least one: check for it before you read metrics. |
embedobject |
A link to a map of the property that shows the layers you asked for. Only when we have at least one of them. See Embedded map. |
embed.urlstring (URL) |
The map page. Put it in the src of an <iframe> on your page. It needs no API key, so it is safe to use in a browser. |
embed.expires_atstring (date-time, UTC) |
When embed.url stops working: one hour after your request, for example 2026-10-06T17:00:00Z. After that the map shows "This map link has expired." Call the API again for a new link. |
Match quality
When you send address, we return the property at that address in your
ZIP codes and grade the match in match.quality. If we cannot place the
address on a property with enough confidence, the response is
404: we do not guess.
| Quality | Meaning |
|---|---|
exact | Every check passed. |
approximate | We found a property, but some checks failed.
match.reasons lists them. It is often a neighbouring property: ask your
user to confirm before you use the numbers. |
Show matched_address so your user can check it. Store
property_id and send it instead of address next time: it
always returns the same property, and it skips the address lookup.
Match reasons
| Reason | Meaning |
|---|---|
partial_match | Only part of the address matched, or the street we found is not the street you sent. |
interpolated | The address is placed along the street, not on a building. |
no_house_number | The address has no house number. |
number_mismatch | The house number of the property we found is different. |
postal_mismatch | The ZIP code of the property we found is different. |
nearest_lot | The address is not inside a property, so we took the nearest one (within 50 m). |
unit | The address is a unit in a building, such as an apartment or condo. A building can hold many units, so we may have found another unit in the same building. A unit has no lawn of its own. |
Embedded map
When you send layers, the response has embed.url. It shows one
property, read-only, for one hour. Call the API again for a new link. The map shows the
layers you asked for, with a legend.
Messages to your page
The map page sends messages to your page with window.postMessage:
window.addEventListener("message", (event) => {
if (event.data?.source !== "oscar") return;
// { source: "oscar", v: 1, type: "ready", propertyId }
// { source: "oscar", v: 1, type: "measurement", layer: "lawn", area, unit }
// { source: "oscar", v: 1, type: "error", status } (410: the link expired)
});
A map load ends in one ready or one error, so you can hide a
loading state on either. ready comes once the map has drawn. Browsers draw
an iframe only while it is on screen, so for a map below the fold, in a closed tab or
hidden, ready comes when your user first sees it.
measurement does not wait for that: it comes as soon as the map's data has
loaded, before ready. status is 410 when the link
expired, another HTTP status when the map data could not load, and 0 when
the link is broken or the map itself could not load.
Errors
Besides the errors every route can return:
| Status | Meaning |
|---|---|
400 | Bad parameters: an unknown field, layer
or unit, both or neither of address and property_id, or
no fields and no layers. |
403 | The property or address is not in your
service area. detail.code is not_in_service_area.
GET /coverage lists your ZIP codes. |
404 | The address is in your company's ZIP codes, but we found no property at it. |
422 | We found the property, but we have no
measurement for anything you asked for in fields and
layers. detail.code is
not_measured, and detail.missing lists the names.
detail also has the property we found, as in a normal response:
property_id, matched_address, and match when
you sent address. |
503 | We cannot look up addresses at the
moment. Try again later, or send property_id, which needs no address
lookup. |
For API tools such as Postman, the OpenAPI schema is at /api/v1/openapi.json.