Search - n49/N49-Data-Api-Documentation GitHub Wiki

SEARCH

The n49 SEARCH API allows partners to search n49 for existing listings. The SEARCH API response will match the search results on n49.ca

Request

Properties

Property Value
Method GET
URL data-api.n49.ca/businesses/search

Parameters

Name Required? Description Example
api_key yes API Key provided by n49
countrycode yes The country of the result listing (ISO 3166-1 alpha-2 code). CA
name No Business name "n49.ca"
city No City in which to search "Toronto"
state No State, region, or province in which to search "ON"
zip No ZIP or postal code in which to search "10011" , "m5n1b1" (Canada)
latitude No Latitude to center the search 43.7035597
longitude No longitude to center the search -79.4133319
radius No Radius to search (in meters). Default value is 2500. 1600
phone No Location's phone number. For international numbers, this number reflects how the number is dialed within the country (i.e., no country code or punctuation). "4163852433"
NOTE: A valid search consists of phone only, name and latlng, or name and address fields. Also we currently only support CA, US, and GB as countryCodes.

Response

Body

A JSON document containing a list of result listings. Includes all listings that match the query.

Each result contains the following fields:

Field Description
id N49 bID for the result
status Status of the listing. AVAILABLE: This listing is available and can be claimed. ACTIVE: You have already claimed this listing. BLOCKED: The listing has an existing relationship with n49.ca and may not be claimed.
name The name of the result listing.
address The street address of the result listing.
address2 Address line 2 for the result listing
sublocality The sublocality (e.g., neighborhood or district) of the result listing
city The city of the result listing
state The state, region, or province of the result listing
zip The ZIP or postal code of the result listing.
countryCode The country of the result listing (ISO 3166-1 alpha-2 code).
latitude The latitude of the result listing
longitude The longitude of the result listing
phone The primary phone number of the listing. For international numbers, the number should match how a person within the country would dial it (i.e., no area code or punctuation).
url The URL where the listing’s details page can be viewed

Examples

{
id: "888303",
status: "AVAILABLE",
name: "N49.ca",
address: "505 Eglinton Ave. W",
address2: "Suite 402",
state: "ON",
sublocality: "Forest Hill (and Forest Hill Village)",
city: "Toronto",
zip: "M5N 1B1",
countryCode: "CA",
latitude: "43.7034153225",
longitude: "-79.4135378393",
phone: "4163852433",
url: "http://www.n49.ca/biz/n49ca/on/toronto/505-eglinton-ave-w/"
},

If no results are found, we'll return an empty list:

[]

We suggest you attempt to search first by phone number, then name / location if that fails to return the results you're looking for.