Requests you can copy and run. Each one returns live data from the API.
Select the programming language you want to display the code examples in.
curl -X GET "https://api.houski.ca/geocoding?api_key=YOUR_API_KEY&latitude=51.0446&longitude=-114.0722&radius=0.5&results_per_page=1&select=address,postal_code,property_id"
const houski_geocoding = async (): Promise<GeocodingResponse> => {
// You must copy the GeocodingResponse type declarations from the
// Houski API documentation to strongly type the response
const url = new URL('https://api.houski.ca/geocoding');
url.searchParams.set('api_key', 'YOUR_API_KEY');
url.searchParams.set('latitude', '51.0446');
url.searchParams.set('longitude', '-114.0722');
url.searchParams.set('radius', '0.5');
url.searchParams.set('results_per_page', '1');
url.searchParams.set('select', 'address,postal_code,property_id');
const response = await fetch(url);
const data = await response.json();
return data;
}
(async () => {
let data: GeocodingResponse = await houski_geocoding();
// Log the response
console.log(data);
})();
{
"cache_hit": true,
"cost_cents": 0.03,
"data": [
{
"address": "513 9 Avenue SW",
"postal_code": "T2P1G1",
"property_id": "e9baf46145362e25"
}
],
"error": "",
"pagination": {
"current_page": 1,
"has_next_page": true,
"has_previous_page": false,
"page_total": 5216
},
"price_quote": false,
"result_total": 5216,
"time_ms": 4614
}