EDIT – It’s been brought to my attention this no longer works. Leaving it to gather dust rather than removing it.
NBNCo have an address search tool on their site to lookup service information for an address. The API it uses actually exposes more data than they show on the website. The API is not documented but it’s fairly self explanatory. Just be sure to add the correct referer header.
Unfortunately it probably won’t tell you anything you want to know, such as the availability of FTTP at your home address. Ahem.
Politics aside, I found that supplying only the lat and lng for an address is sufficient for a lookup, though I get some odd results; it’s not clear how and when they’re doing geocoding from the parameters you supply.
In curl-land:
curl -X GET \
'http://www.nbnco.com.au/api/map/search.html?\
lat={decimal latitude}&\
lng={decimal longitude}&\
streetNumber={street number}\&
street={street}\&
postCode={postCode}\&
state={VIC/NSW/TAS/QLD/WA/NT/SA} \
-H 'referer: http://www.nbnco.com.au/connect-home-or-business/check-your-address.html'
If you use Postman (and you should) for API testing, I’ve made a collection that supports this.
You’ll get a JSON response that follows this template:
{
"serviceAvailableAddress": false,
"servingArea": {
"isDisconnectionDatePassed": true,
"techTypeMapLabel": "nbn™ Fibre to the premises (FTTP)",
"techTypeDescription": "An nbn™ Fibre to the premises connection (FTTP) is used in circumstances where an optic fibre line will be run from the nearest available fibre node, to your premises.",
"rfsMessage": "",
"csaId": "CSA300000010862",
"addressStatus": "0",
"serviceType": "fibre",
"id": "fibre:3BRU-A0106",
"serviceStatus": "available",
"disconnectionDate": "02/01/2015",
"description": "XDA",
"serviceCategory": "brownfields",
"techTypeLabel": "Fibre to the premises (FTTP)"
},
"fsams": []
}
god bless you
LikeLike
Hi, I’ve tried to run this through Postman and I get a 403 forbidden notice when carrying out a search.
I ran this:
http://www2.nbnco.com.au/api/map/search.html?lat=-34.434690&lng= 150.888694
Any idea why?
Cheers
LikeLike
You need to send the correct referrer header in your request. The referrer is http://www.nbnco.com.au/connect-home-or-business/check-your-address.html
LikeLike
Can you please elaborate somehow how can we implement this API into leaflet mapping api and search an address using textual adress?
LikeLike
There are already plenty of good tutorials out there on using Leaflet and the answer really depends on how you’re building your site. I think the main thing you would have to consider is how to request the address from the user, validate it and geocode it, (i.e. getting the lat/lng value for a street address). I’d start with Google for that: https://developers.google.com/maps/documentation/geocoding/intro
For something really simple, you might use a text search for an address (e.g. http://labs.easyblog.it/maps/leaflet-search/), and hook this up to the geocoder, NBN search, and display the attributes for the NBN service.
LikeLike
I’m only getting the below response from postman
{
“servingArea”: null,
“serviceAvailableAddress”: true,
“rfsDateConfident”: false
}
Can you confirm they’ve removed most of the servingArea info?
LikeLike
I’m late to the party, but I don’t think this works since they modified their site. At least the curl command does not.
LikeLike
They literally just took down the API… Any ideas?
LikeLike
Not too sure if it’s of use, but check out https://github.com/chrishardinge/nbn-lookup
Just pushed it out today. If you’re not using PHP, it should still point you in the right direction
LikeLiked by 1 person
Is this still working and how to implement this
LikeLike
I had a report that it’s no longer working. I’ll update the post to reflect this.
LikeLike
Hi Guys, any update… I have hit a rock here too 😦
LikeLike
hi hamun2015, you can use the following to get location IDs in the vicinity of a GPS location:
curl -s -H ‘Referer: https://www2.nbnco.com.au/residential/learn/rollout-map‘ ‘https://places.nbnco.net.au/places/v1/nearby?lat=-31.xxxxxxxxxxxxxxx&lng=115.xxxxxxxxxxxxxx&source=website_rollout_map’
(replacing -31.xxxx with your latitude and 115.xxx with your longitude)
and this to get detailed information on a location ID:
curl -s -H ‘Referer: https://www2.nbnco.com.au/residential/learn/rollout-map‘ ‘https://places.nbnco.net.au/places/v2/details/LOCxxxxxxxxxxxx?source=website_rollout_map’
LikeLiked by 1 person
Awesome, thanks!
LikeLike
Thank you very much Ittai
LikeLike
Found an NBNco Address Search API here – https://rapidapi.com/api-endpoints/api/nbnco-address-check
LikeLike