<aside> 💡 For support getting set up, contact us via the Swiftcomplete webpage
</aside>
Use the Postcode Lookup API to list addresses within a postcode, and receive full address details when a user selects their address.
Pass the postcode in the text parameter:
Request
https://api.swiftcomplete.com/v1/swiftlookup/?key=INSERTKEYHERE&text=W2 5EU
Response
[
{
"primary": { "text": "W2 5EU", "highlights": [0, 1, 3, 5] },
"secondary": { "text": "Alfred Rd", "highlights": [] },
"type": "place.area.postcode",
"isContainer": true,
"container": "V1;W2 5EU;51.521198;-0.196334",
"countryCode": "GB"
}
]
Take the container **from the previous request and pass it in as a parameter to list the first 100 addresses in the postcode:
Request
https://api.swiftcomplete.com/v1/swiftlookup/?key=INSERTKEYHERE&container=V1;W2 5EU;51.521198;-0.196334&maxResults=100
Response
[
{
"primary": { "text": "Blaiz, 65 Alfred Rd", "highlights": [] },
"secondary": { "text": "W2 5EU", "highlights": [0, 1, 3, 5] },
"type": "address.business",
"isContainer": false,
"countryCode": "GB"
},
{
"primary": { "text": "Carnot, 65 Alfred Rd", "highlights": [] },
"secondary": { "text": "W2 5EU", "highlights": [0, 1, 3, 5] },
"type": "address.business",
"isContainer": false,
"countryCode": "GB"
},
{
"primary": { "text": "Craster, 65 Alfred Rd", "highlights": [] },
"secondary": { "text": "W2 5EU", "highlights": [0, 1, 3, 5] },
"type": "address.business",
"isContainer": false,
"countryCode": "GB"
},
...
]