### Property Search SDK Implementations Source: https://docs.hellodata.ai/api-reference/api-reference/property/search Examples of how to perform a GET request to the property search endpoint using various programming languages. ```python import requests url = "https://api.hellodata.ai/property/search" querystring = {"q":"q"} headers = {"x-api-key": ""} response = requests.get(url, headers=headers, params=querystring) print(response.json()) ``` ```javascript const url = 'https://api.hellodata.ai/property/search?q=q'; const options = {method: 'GET', headers: {'x-api-key': ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.hellodata.ai/property/search?q=q" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("x-api-key", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.hellodata.ai/property/search?q=q") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["x-api-key"] = '' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.hellodata.ai/property/search?q=q") .header("x-api-key", "") .asString(); ``` ```php request('GET', 'https://api.hellodata.ai/property/search?q=q', [ 'headers' => [ 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.hellodata.ai/property/search?q=q"); var request = new RestRequest(Method.GET); request.AddHeader("x-api-key", ""); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["x-api-key": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api.hellodata.ai/property/search?q=q")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` -------------------------------- ### SDK Implementation Examples Source: https://docs.hellodata.ai/api-reference/api-reference/property/post-property Examples showing how to authenticate and send a POST request to the property endpoint using various programming languages. ```python import requests url = "https://api.hellodata.ai/property" payload = { "property": { "street_address": "123 Main St", "city": "New York", "state": "NY", "zip_code": "01234", "lat": 40.7128, "lon": -74.006, "building_name": "The Best Building", "is_single_family": False, "is_condo": False, "is_apartment": True, "number_units": 100, "year_built": 2020, "number_stories": 10, "building_amenities": ["24_hour_maintenance"], "unit_amenities": ["air_conditioning"], "avg_quality": 0.8, "units": [ { "bed": 2, "bath": 1, "name": "1A", "sqft": 1000, "price": 1000 } ] } } headers = { "x-api-key": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.hellodata.ai/property'; const options = { method: 'POST', headers: {'x-api-key': '', 'Content-Type': 'application/json'}, body: '{"property":{"street_address":"123 Main St","city":"New York","state":"NY","zip_code":"01234","lat":40.7128,"lon":-74.006,"building_name":"The Best Building","is_single_family":false,"is_condo":false,"is_apartment":true,"number_units":100,"year_built":2020,"number_stories":10,"building_amenities":["24_hour_maintenance"],"unit_amenities":["air_conditioning"],"avg_quality":0.8,"units":[{"bed":2,"bath":1,"name":"1A","sqft":1000,"price":1000}]}}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.hellodata.ai/property" payload := strings.NewReader("{\n \"property\": {\n \"street_address\": \"123 Main St\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"zip_code\": \"01234\",\n \"lat\": 40.7128,\n \"lon\": -74.006,\n \"building_name\": \"The Best Building\",\n \"is_single_family\": false,\n \"is_condo\": false,\n \"is_apartment\": true,\n \"number_units\": 100,\n \"year_built\": 2020,\n \"number_stories\": 10,\n \"building_amenities\": [\n \"24_hour_maintenance\"\n ],\n \"unit_amenities\": [\n \"air_conditioning\"\n ],\n \"avg_quality\": 0.8,\n \"units\": [\n {\n \"bed\": 2,\n \"bath\": 1,\n \"name\": \"1A\",\n \"sqft\": 1000,\n \"price\": 1000\n }\n ]\n }\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-api-key", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.hellodata.ai/property") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"property\": {\n \"street_address\": \"123 Main St\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"zip_code\": \"01234\",\n \"lat\": 40.7128,\n \"lon\": -74.006,\n \"building_name\": \"The Best Building\",\n \"is_single_family\": false,\n \"is_condo\": false,\n \"is_apartment\": true,\n \"number_units\": 100,\n \"year_built\": 2020,\n \"number_stories\": 10,\n \"building_amenities\": [\n \"24_hour_maintenance\"\n ],\n \"unit_amenities\": [\n \"air_conditioning\"\n ],\n \"avg_quality\": 0.8,\n \"units\": [\n {\n \"bed\": 2,\n \"bath\": 1,\n \"name\": \"1A\",\n \"sqft\": 1000,\n \"price\": 1000\n }\n ]\n }\n}" response = http.request(request) puts response.read_body ``` -------------------------------- ### Retrieve Property Details Source: https://docs.hellodata.ai/api-reference/api-reference/property/get-property Examples for performing a GET request to the property endpoint using different programming languages. ```python import requests url = "https://api.hellodata.ai/property/0e628031-57b8-5394-821d-13779318fef4" headers = {"x-api-key": ""} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.hellodata.ai/property/0e628031-57b8-5394-821d-13779318fef4'; const options = {method: 'GET', headers: {'x-api-key': ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.hellodata.ai/property/0e628031-57b8-5394-821d-13779318fef4" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("x-api-key", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.hellodata.ai/property/0e628031-57b8-5394-821d-13779318fef4") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["x-api-key"] = '' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.hellodata.ai/property/0e628031-57b8-5394-821d-13779318fef4") .header("x-api-key", "") .asString(); ``` ```php request('GET', 'https://api.hellodata.ai/property/0e628031-57b8-5394-821d-13779318fef4', [ 'headers' => [ 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.hellodata.ai/property/0e628031-57b8-5394-821d-13779318fef4"); var request = new RestRequest(Method.GET); request.AddHeader("x-api-key", ""); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["x-api-key": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api.hellodata.ai/property/0e628031-57b8-5394-821d-13779318fef4")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` -------------------------------- ### Search Tags SDK Examples Source: https://docs.hellodata.ai/api-reference/api-reference/property-report/search-tags Implementation examples for the search_tags endpoint across various programming languages. ```python import requests url = "https://api.hellodata.ai/property_report/search_tags" payload = {} headers = { "x-api-key": "", "Content-Type": "application/json" } response = requests.get(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.hellodata.ai/property_report/search_tags'; const options = { method: 'GET', headers: {'x-api-key': '', 'Content-Type': 'application/json'}, body: '{}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.hellodata.ai/property_report/search_tags" payload := strings.NewReader("{}") req, _ := http.NewRequest("GET", url, payload) req.Header.Add("x-api-key", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.hellodata.ai/property_report/search_tags") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["x-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.hellodata.ai/property_report/search_tags") .header("x-api-key", "") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php request('GET', 'https://api.hellodata.ai/property_report/search_tags', [ 'body' => '{}', 'headers' => [ 'Content-Type' => 'application/json', 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.hellodata.ai/property_report/search_tags"); var request = new RestRequest(Method.GET); request.AddHeader("x-api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "x-api-key": "", "Content-Type": "application/json" ] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.hellodata.ai/property_report/search_tags")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` -------------------------------- ### Shape Search SDK Implementations Source: https://docs.hellodata.ai/api-reference/api-reference/market/shape-search Examples of how to perform a GET request to the shape search endpoint using various programming languages. Ensure the x-api-key header is replaced with a valid API key. ```python import requests url = "https://api.hellodata.ai/market/shape_search" querystring = {"q":"farmers market seattle"} payload = {} headers = { "x-api-key": "", "Content-Type": "application/json" } response = requests.get(url, json=payload, headers=headers, params=querystring) print(response.json()) ``` ```javascript const url = 'https://api.hellodata.ai/market/shape_search?q=farmers+market+seattle'; const options = { method: 'GET', headers: {'x-api-key': '', 'Content-Type': 'application/json'}, body: '{}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.hellodata.ai/market/shape_search?q=farmers+market+seattle" payload := strings.NewReader("{}") req, _ := http.NewRequest("GET", url, payload) req.Header.Add("x-api-key", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.hellodata.ai/market/shape_search?q=farmers+market+seattle") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["x-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.hellodata.ai/market/shape_search?q=farmers+market+seattle") .header("x-api-key", "") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php request('GET', 'https://api.hellodata.ai/market/shape_search?q=farmers+market+seattle', [ 'body' => '{}', 'headers' => [ 'Content-Type' => 'application/json', 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.hellodata.ai/market/shape_search?q=farmers+market+seattle"); var request = new RestRequest(Method.GET); request.AddHeader("x-api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "x-api-key": "", "Content-Type": "application/json" ] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.hellodata.ai/market/shape_search?q=farmers+market+seattle")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` -------------------------------- ### Retrieve Property Report List Source: https://docs.hellodata.ai/api-reference Examples for making a GET request to the property report list endpoint across multiple programming languages. Ensure the x-api-key header is replaced with your valid API key. ```python import requests url = "https://api.hellodata.ai/property_report/list" payload = {} headers = { "x-api-key": "", "Content-Type": "application/json" } response = requests.get(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.hellodata.ai/property_report/list'; const options = { method: 'GET', headers: {'x-api-key': '', 'Content-Type': 'application/json'}, body: '{}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.hellodata.ai/property_report/list" payload := strings.NewReader("{}") req, _ := http.NewRequest("GET", url, payload) req.Header.Add("x-api-key", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.hellodata.ai/property_report/list") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["x-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.hellodata.ai/property_report/list") .header("x-api-key", "") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php request('GET', 'https://api.hellodata.ai/property_report/list', [ 'body' => '{}', 'headers' => [ 'Content-Type' => 'application/json', 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.hellodata.ai/property_report/list"); var request = new RestRequest(Method.GET); request.AddHeader("x-api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "x-api-key": "", "Content-Type": "application/json" ] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.hellodata.ai/property_report/list")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` -------------------------------- ### API Request Example Source: https://docs.hellodata.ai/api-reference An empty JSON object representing a standard API request body. ```json {} ``` -------------------------------- ### Property API Response JSON Source: https://docs.hellodata.ai/api-reference/api-reference/property/get-property Example of the full JSON object returned when querying property data. ```json { "id": "52907745-7672-470e-a803-a2f8feb52944", "building_name": "OneEleven", "street_address": "111 West Wacker Drive", "city": "Chicago", "state": "IL", "zip_code": "60601", "year_built": 2014, "number_units": 505, "number_stories": 60, "lat": 41.88651, "lon": -87.63141, "created_on": "2024-02-13", "building_availability": [ { "id": "123e4567-e89b-12d3-a456-426614174000", "is_floorplan": true, "bed": 2, "bath": 2, "partial_bath": 1, "sqft": 850, "floorplan_name": "2B2B", "unit_name": "203", "enter_market": "2023-12-01", "exit_market": "2024-01-15", "tags": [ "ada_unit" ], "history": [ { "from_date": "2024-01-01", "to_date": "2024-03-31", "price": 1500, "effective_price": 1450, "period_id": 0, "min_price": 1200, "max_price": 1800, "min_effective_price": 1150, "max_effective_price": 1750, "lease_term": 13, "price_plans": [ [ 12, 1800, 1750 ], [ 11, 1810, 1750 ] ] } ], "availability_periods": [ { "period_id": 0, "enter_market": "2023-12-01", "exit_market": "2024-01-15", "days_on_market": 45, "availability": "2024-01-01", "deposit": 1.1, "unavailable_periods": [ { "from_date": "2023-12-01", "to_date": "2024-01-14" } ], "price_plans": [ { "duration_in_months": 12, "specials": "Special incentives available at OneEleven! Enjoy up to a half month free on select apartments.", "price": 1500, "effective_price": 1450, "monthly_rent": 1500 } ] } ], "floor": 5, "availability": "2024-01-01", "min_price": 1200, "price": 1500, "max_price": 1800, "min_effective_price": 1150, "effective_price": 1450, "max_effective_price": 1750, "days_on_market": 45, "min_sqft": 800, "max_sqft": 900, "created_on": "2023-11-01", "price_plans": [ { "duration_in_months": 12, "specials": "Special incentives available at OneEleven! Enjoy up to a half month free on select apartments.", "price": 1500, "effective_price": 1450, "monthly_rent": 1500 } ], "amenities": [ "string" ], "lease_term": 13, "deposit": 1.1, "school_term": "string" } ], "building_quality": { "property_overall_quality": 0.85, "avg_quality_score_bedroom": 0.82, "avg_quality_score_kitchen": 0.87, "avg_quality_score_bathroom": 0.81, "avg_quality_score_dining_room": 0.8, "avg_quality_score_common_areas": 0.83, "avg_quality_score_fitness_center": 0.78, "avg_quality_score_laundry_room": 0.75, "avg_quality_score_living_room": 0.84, "avg_quality_score_main_entrance": 0.86, "avg_quality_score_stairs_hallway": 0.79, "avg_quality_score_swimming_pool": 0.88, "avg_quality_score_walk_in_closet": 0.8 }, "street_address_alias": [ "111 West Wacker", "111 West Wacker Drive" ], "msa": "Chicago-Naperville-Elgin, IL-IN-WI", "market_embedding": [ 1.1 ], "building_name_alias": [ "string" ], "building_phone_number": "7087250291", "building_website": "https://www.oneelevenchicago.com/", "is_single_family": false, "is_condo": false, "is_apartment": true, "year_built_prediction": "2020+", "number_stories_prediction": "11+", "management_company": "The Bozzuto Group", "pricing_strategy": { "is_using_rev_management": true, "avg_duration": 30, "avg_price_change": 100, "avg_time_on_market": 30, "day_of_week_distribution": [ 1.1 ], "count_prices": 1.1 }, "cats_monthly_rent": 50, "cats_one_time_fee": 50, "cats_deposit": 50, "dogs_monthly_rent": 50, "dogs_one_time_fee": 50, "dogs_deposit": 50, "admin_fee": 600, "amenity_fee": 0, "application_fee": 65, "storage_fee": 50, "parking_covered": 300, "parking_garage": 319, "parking_surface_lot": 100, "min_deposit": 2248, "max_deposit": 2248, "building_amenities": [ "24_hour_maintenance" ], "unit_amenities": [ "air_conditioning" ], "review_analysis": { "avg_score": 1.1, "count_reviews": 1.1, "positive_counts": {}, "negative_counts": {} }, "property_embedding": [ 1.1 ], "demographics": {}, "census_tract_id": "11001007301", "ami_limits": {}, "is_student": false, "is_senior": false, "is_build_to_rent": false, "is_affordable": false, "number_units_prediction": 460 } ``` -------------------------------- ### Market Search SDK Implementations Source: https://docs.hellodata.ai/api-reference/api-reference/market/market-search Examples of how to perform a POST request to the market search endpoint using various programming languages. ```python import requests url = "https://api.hellodata.ai/market/search" payload = { "coordinates": [[[[1.1]]]] } headers = { "x-api-key": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.hellodata.ai/market/search'; const options = { method: 'POST', headers: {'x-api-key': '', 'Content-Type': 'application/json'}, body: '{"coordinates":[[[[1.1]]]]}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.hellodata.ai/market/search" payload := strings.NewReader("{\n \"coordinates\": [\n [\n [\n [\n 1.1\n ]\n ]\n ]\n ]\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-api-key", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.hellodata.ai/market/search") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"coordinates\": [\n [\n [\n [\n 1.1\n ]\n ]\n ]\n ]\n}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.hellodata.ai/market/search") .header("x-api-key", "") .header("Content-Type", "application/json") .body("{\n \"coordinates\": [\n [\n [\n [\n 1.1\n ]\n ]\n ]\n ]\n}") .asString(); ``` ```php request('POST', 'https://api.hellodata.ai/market/search', [ 'body' => '{ "coordinates": [ [ [ [ 1.1 ] ] ] ] }', 'headers' => [ 'Content-Type' => 'application/json', 'x-api-key' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.hellodata.ai/market/search"); var request = new RestRequest(Method.POST); request.AddHeader("x-api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"coordinates\": [\n [\n [\n [\n 1.1\n ]\n ]\n ]\n ]\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "x-api-key": "", "Content-Type": "application/json" ] let parameters = ["coordinates": [[[[1.1]]]]] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.hellodata.ai/market/search")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` -------------------------------- ### Dataset Export SDK Implementations Source: https://docs.hellodata.ai/api-reference/api-reference/dataset/dataset-export-async Code examples for initiating an asynchronous dataset export using various programming languages. ```python import requests url = "https://api.hellodata.ai/dataset/export" payload = { "format": "csv", "name": "Monthly Rent Report", "webhookURL": "https://webhooks.example.com/dataset-export", "dataset": { "scopes": [{ "column": "lat" }, { "column": "lon" }, { "column": "asking_rent" }, { "column": "number_units" }], "filters": { "and": [None] } } } headers = { "x-api-key": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.hellodata.ai/dataset/export'; const options = { method: 'POST', headers: {'x-api-key': '', 'Content-Type': 'application/json'}, body: '{"format":"csv","name":"Monthly Rent Report","webhookURL":"https://webhooks.example.com/dataset-export","dataset":{"scopes":[{"column":"lat"},{"column":"lon"},{"column":"asking_rent"},{"column":"number_units"}],"filters":{"and":[null]}}}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.hellodata.ai/dataset/export" payload := strings.NewReader("{\n \"format\": \"csv\",\n \"name\": \"Monthly Rent Report\",\n \"webhookURL\": \"https://webhooks.example.com/dataset-export\",\n \"dataset\": {\n \"scopes\": [\n {\n \"column\": \"lat\"\n },\n {\n \"column\": \"lon\"\n },\n {\n \"column\": \"asking_rent\"\n },\n {\n \"column\": \"number_units\"\n }\n ],\n \"filters\": {\n \"and\": [\n null\n ]\n }\n }\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-api-key", "") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.hellodata.ai/dataset/export") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"format\": \"csv\",\n \"name\": \"Monthly Rent Report\",\n \"webhookURL\": \"https://webhooks.example.com/dataset-export\",\n \"dataset\": {\n \"scopes\": [\n {\n \"column\": \"lat\"\n },\n {\n \"column\": \"lon\"\n },\n {\n \"column\": \"asking_rent\"\n },\n {\n \"column\": \"number_units\"\n }\n ],\n \"filters\": {\n \"and\": [\n null\n ]\n }\n }\n}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.hellodata.ai/dataset/export") .header("x-api-key", "") .header("Content-Type", "application/json") .body("{\n \"format\": \"csv\",\n \"name\": \"Monthly Rent Report\",\n \"webhookURL\": \"https://webhooks.example.com/dataset-export\",\n \"dataset\": {\n \"scopes\": [\n {\n \"column\": \"lat\"\n },\n {\n \"column\": \"lon\"\n },\n {\n \"column\": \"asking_rent\"\n },\n {\n \"column\": \"number_units\"\n }\n ],\n \"filters\": {\n \"and\": [\n null\n ]\n }\n }\n}") .asString(); ``` ```php request('POST', 'https://api.hellodata.ai/dataset/export', [ 'body' => '{ "format": "csv", "name": "Monthly Rent Report", "webhookURL": "https://webhooks.example.com/dataset-export", "dataset": { "scopes": [ { "column": "lat" }, { "column": "lon" }, { "column": "asking_rent" }, { "column": "number_units" } ], "filters": { "and": [ null ] } } }', 'headers' => [ 'Content-Type' => 'application/json', 'x-api-key' => '', ], ]); echo $response->getBody(); ```