Search
Overview
The Search endpoint is used to retrieve a list of suggested addresses from a search query.
We recommend that you read our API Overview guide first.
API Endpoint
https://api.autoaddress.com/3.0/search
Request
To retrieve Search results, a simple GET
request from your desired language is all that is needed. The request must be authenticated. Please see the API Authentication documentation for full details.
Input Fields
Name | Description | Type | Default |
---|---|---|---|
key* | Your API key. Required if token is not provided. See Authentication documentation for more details | string | None |
token* | Access token from Create Token endpoint. Required if key is not provided. See Authentication documentation for more details | string | None |
address* | Address to search | string | None |
country | Country to limit results to | string | "IE" |
latitude | Latitude to search at | string | None |
longitude | Longitude to search at | string | None |
h3index | H3 index to search in | string | None |
language | Language to return result in | string | "en" |
limit | Set the max number of options to return. Minimum value = 3, Maximum value = 400. | int | 8 |
* Required Fields
The following is an example Search API call in cURL using an address and token.
curl --location 'https://api.autoaddress.com/3.0/search?address=YOUR_ADDRESS&token=YOUR_TOKEN'
Response
The following is a sample JSON response returned for a Search API request.
{
"type": "search",
"message": {
"id": 3100,
"language": "en",
"value": "Select an option below"
},
"options": [
{
"value": "Dublin Street Medical Centre, 19 Dublin Street, Longford, N39",
"link": {
"rel": "drilldown",
"href": "https://api.autoaddress.com/3.0/drilldown?aa3Id=IE311b5a4b-afca-4129-a7d2-0f91e49504a8_Latn_en_V&originalEndpoint=Search&address=dublin%20street%20medical&token=s1lMRsRghn7_stw9rxFP_Et_FnrsgJo9NHKdhxlBpVPzH3psc-A8XgIZHbIcObk8gZSCcqn6Dnu0qXKxwIeCIA&sig=6e15ca6b966cb671ed1d260afb317ae6",
"title": "Dublin Street Medical Centre, 19 Dublin Street, Longford, N39"
},
"format": {
"highlights": [
0,
29
],
"lineBreaks": []
},
"suffix": "2 Addresses"
},
{
"value": "ENHANCE MEDICAL DUBLIN, 22 Frederick Street South, Dublin 2",
"link": {
"rel": "lookup",
"href": "https://api.autoaddress.com/3.0/lookup?aa3Id=IE1900161611_Latn_en_V&token=s1lMRsRghn7_stw9rxFP_Et_FnrsgJo9NHKdhxlBpVPzH3psc-A8XgIZHbIcObk8gZSCcqn6Dnu0qXKxwIeCIA&sig=b3e350c948f82852abc5a5eb6881a13a",
"title": "ENHANCE MEDICAL DUBLIN, 22 Frederick Street South, Dublin 2"
},
"format": {
"highlights": [
0,
23
],
"lineBreaks": []
},
"suffix": ""
},
{
"value": "DAME STREET MEDICAL CENTRE, 16 Dame Street, Dublin 2",
"link": {
"rel": "lookup",
"href": "https://api.autoaddress.com/3.0/lookup?aa3Id=IE1900009041_Latn_en_V&token=s1lMRsRghn7_stw9rxFP_Et_FnrsgJo9NHKdhxlBpVPzH3psc-A8XgIZHbIcObk8gZSCcqn6Dnu0qXKxwIeCIA&sig=237b4ef243e0a9b5e551bd0f7f4a0149",
"title": "DAME STREET MEDICAL CENTRE, 16 Dame Street, Dublin 2"
},
"format": {
"highlights": [
0,
27
],
"lineBreaks": []
},
"suffix": ""
},
{
"value": "CLARE STREET MEDICAL CENTRE, 26 Clare Street, Dublin 2",
"link": {
"rel": "lookup",
"href": "https://api.autoaddress.com/3.0/lookup?aa3Id=IE1900174006_Latn_en_V&token=s1lMRsRghn7_stw9rxFP_Et_FnrsgJo9NHKdhxlBpVPzH3psc-A8XgIZHbIcObk8gZSCcqn6Dnu0qXKxwIeCIA&sig=f884cf3a99e1e558e9a6817148936e2a",
"title": "CLARE STREET MEDICAL CENTRE, 26 Clare Street, Dublin 2"
},
"format": {
"highlights": [
0,
28
],
"lineBreaks": []
},
"suffix": ""
},
{
"value": "BAGGOT STREET MEDICAL, 10 Baggot Street Upper, Dublin 4",
"link": {
"rel": "lookup",
"href": "https://api.autoaddress.com/3.0/lookup?aa3Id=IE1900367134_Latn_en_V&token=s1lMRsRghn7_stw9rxFP_Et_FnrsgJo9NHKdhxlBpVPzH3psc-A8XgIZHbIcObk8gZSCcqn6Dnu0qXKxwIeCIA&sig=7eb11e4b1b532b76e3160c7d9b6ee135",
"title": "BAGGOT STREET MEDICAL, 10 Baggot Street Upper, Dublin 4"
},
"format": {
"highlights": [
0,
22
],
"lineBreaks": []
},
"suffix": ""
},
{
"value": "ABBEY STREET MEDICAL CENTRE, 71 Abbey Street Middle, Dublin 1",
"link": {
"rel": "lookup",
"href": "https://api.autoaddress.com/3.0/lookup?aa3Id=IE1900183682_Latn_en_V&token=s1lMRsRghn7_stw9rxFP_Et_FnrsgJo9NHKdhxlBpVPzH3psc-A8XgIZHbIcObk8gZSCcqn6Dnu0qXKxwIeCIA&sig=a818eeabb40e42793c353149c58b4fd8",
"title": "ABBEY STREET MEDICAL CENTRE, 71 Abbey Street Middle, Dublin 1"
},
"format": {
"highlights": [
0,
28
],
"lineBreaks": []
},
"suffix": ""
},
{
"value": "PARLIAMENT STREET MEDICAL PRACTICE, 11 Parliament Street, Dublin 2",
"link": {
"rel": "lookup",
"href": "https://api.autoaddress.com/3.0/lookup?aa3Id=IE1900168211_Latn_en_V&token=s1lMRsRghn7_stw9rxFP_Et_FnrsgJo9NHKdhxlBpVPzH3psc-A8XgIZHbIcObk8gZSCcqn6Dnu0qXKxwIeCIA&sig=baa99fea29cc8e2e97469cb88dc7b31b",
"title": "PARLIAMENT STREET MEDICAL PRACTICE, 11 Parliament Street, Dublin 2"
},
"format": {
"highlights": [
0,
35
],
"lineBreaks": []
},
"suffix": ""
},
{
"value": "O'CONNEL STREET MEDICAL CENTRE, 5 O'Connell Street Lower, Dublin 1",
"link": {
"rel": "lookup",
"href": "https://api.autoaddress.com/3.0/lookup?aa3Id=IE1900171910_Latn_en_V&token=s1lMRsRghn7_stw9rxFP_Et_FnrsgJo9NHKdhxlBpVPzH3psc-A8XgIZHbIcObk8gZSCcqn6Dnu0qXKxwIeCIA&sig=40dc31eead77b3792fcaeb9a6d2a3162",
"title": "O'CONNEL STREET MEDICAL CENTRE, 5 O'Connell Street Lower, Dublin 1"
},
"format": {
"highlights": [
0,
31
],
"lineBreaks": []
},
"suffix": ""
}
],
"links": [
{
"rel": "self",
"href": "https://api.autoaddress.com/3.0/search?address=dublin+street+medical&token=s1lMRsRghn7_stw9rxFP_Et_FnrsgJo9NHKdhxlBpVPzH3psc-A8XgIZHbIcObk8gZSCcqn6Dnu0qXKxwIeCIA&version=3.1.66",
"title": "self"
},
{
"rel": "autoaddressformlayout",
"href": "https://api.autoaddress.com/3.0/autoaddressformlayout?token=s1lMRsRghn7_stw9rxFP_Et_FnrsgJo9NHKdhxlBpVPzH3psc-A8XgIZHbIcObk8gZSCcqn6Dnu0qXKxwIeCIA&sig=584e07f799db923fd378c83381d42de1",
"title": "Enter your address manually >"
}
]
}
Output Fields
Name | Type | Description |
---|---|---|
type | string | Name of the response type |
message | Message | A Message object (detailed below) |
options | Option[] | An array of Option objects (detailed below) |
links | Link[] | An array of Link object (detailed below) |
Message Object
Name | Type | Description |
---|---|---|
id | int | Message ID |
language | string | Language of the message |
value | string | Value of the message |
Option Object
Name | Type | Description |
---|---|---|
value | string | Display name of the option |
link | Link | A Link Object (Detailed below) |
format | Format | Formatting instructions for autocomplete widget |
suffix | string | Suffix to be displayed after the options value |
Link Object
Name | Type | Description |
---|---|---|
rel | string | Type of link |
href | string | The hyperlink the client should follow is stored in the value of this property |
title | string | Display name of the link |
Examples
jQuery
var settings = {
"url": "https://api.autoaddress.com/3.0/search?address=YOUR_ADDRESS&token=YOUR_TOKEN",
"method": "GET",
"timeout": 0,
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Ruby
require "uri"
require "net/http"
url = URI("https://api.autoaddress.com/3.0/search?address=YOUR_ADDRESS&token=YOUR_TOKEN")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
<code data-language="ruby"><code data-language="ruby">request["User-Agent"] = "Ruby application" </code></code>
response = https.request(request)
puts response.read_body
Python
import requests
url = "https://api.autoaddress.com/3.0/search?address=YOUR_ADDRESS&token=YOUR_TOKEN"
payload = {}
headers = {
<code data-language="python"> 'User-Agent': 'Python application'</code>
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
C#
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.autoaddress.com/3.0/search?address=YOUR_ADDRESS&token=YOUR_TOKEN");
<code data-language="csharp">request.Headers.Add("User-Agent", ".NET application");</code>
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());