Business Lookup
Address, phone, hours, rating and category for a local business, from a name and city.
curl -X POST https://api.1lookup.dev/v1/business-lookup \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Northwind Coffee Roasters","location":"Portland, OR"}'{
"success": true,
"data": {
"name": "Northwind Coffee Roasters",
"business_status": "open",
"address": {
"street": "418 Example St",
"city": "Portland",
"state": "OR",
"postal_code": "97209",
"country": "US",
"formatted": "418 Example St, Portland, OR 97209"
},
"phone": "+15035550117",
"website": "https://www.northwindcoffee.example",
"categories": [
"Coffee roaster",
"Cafe"
],
"rating": 4.6,
"review_count": 812,
"coordinates": {
"lat": 45.5262,
"lng": -122.6816
},
"hours": {
"monday": "07:00-17:00",
"tuesday": "07:00-17:00",
"wednesday": "07:00-17:00",
"thursday": "07:00-17:00",
"friday": "07:00-18:00",
"saturday": "08:00-18:00",
"sunday": "08:00-15:00"
}
},
"meta": {
"credits_used": 10,
"credits_remaining": 999,
"cached": false,
"request_id": "req_8f3a2c1e9b7d"
}
}Authorization
Authorizationstring<bearer>requiredYour API key as a Bearer token. Live keys start with 1lk_live_. Test keys start with 1lk_test_ and return this endpoint's sample response without spending credits. See authentication.
Body
Send the fields as a JSON object with Content-Type: application/json.
namestringrequiredBusiness name. Example: Northwind Coffee Roasters
locationstringrequiredCity and state. Example: Portland, OR
freshbooleanSkip the 7-day cache and run a new lookup. Charged as a normal lookup.
referencestringYour own identifier, echoed back in meta and shown in lookup history.
Response
A 200 response carries the result in data and the cost of the call in meta. These are the fields most integrations read.
successbooleantrue when the lookup ran.
data.business_statusstringWhether the listing is marked open or closed, so you can drop businesses that have shut.
data.address.formattedstringThe full street address on one line, with the parts also split into fields.
data.phonestringThe public phone number on the listing.
data.websitestringThe site the business links to from its listing.
data.hoursobjectOpening hours for each day of the week.
data.ratingnumberThe average star rating out of 5. The review_count field says how many reviews it rests on.
data.categoriesarrayWhat kind of business it is, as listed.
data.coordinatesobjectLatitude and longitude for mapping and distance calculations.
meta.credits_usednumberCredits charged for this call.
meta.credits_remainingnumberYour balance after the call.
meta.cachedbooleantrue when the result came from the 7-day cache.
meta.request_idstringQuote this when you contact support.
Errors
A failed request returns success: false with an error object, and is never charged. The full list is on the errors page.
| HTTP | Code | Meaning |
|---|---|---|
| 401 | unauthorized | The key is missing, malformed or revoked. |
| 402 | insufficient_credits | Your credits are used up and pay as you go is off or at its limit. |
| 422 | invalid_input | A field is missing or malformed. The field property names it. |
| 429 | rate_limited | Too many requests for this key. Wait for the Retry-After interval. |
| 500 | internal_error | Something failed on our side. Safe to retry. |
| 503 | source_unavailable | An upstream source did not answer in time. Safe to retry. |
Billing
10 credits. Charged when the lookup runs and returns a result. Errors are never charged, and repeating the same input within 7 days is served from cache at no charge.
Product overview and use cases