Get Allhomes division (suburb) names and IDs for a (vector of) suburb(s). The input must be a character vector of suburbs with states (of the form "Acton, ACT"), and it uses the Allhomes API to query internal Allhomes data for matching entries. If successful, it will return a tibble with Allhomes division names, states, postcodes and IDs. If unsuccessful, it will skip the entry.

get_ah_division_ids(x, quiet = FALSE)

Arguments

x

A character vector (or scalar) with suburb + state entries (e.g. "Balmain, NSW")

quiet

If TRUE then messages are suppressed.

Value

A tibble with Allhomes data for the division (suburb), state, postcode, and ID.

Examples

# \donttest{
get_ah_division_ids(c("Acton, ACT", "Balmain, NSW"))
#> [2022-09-13 06:09:00] Looking up division ID for suburb='Acton, ACT'...
#> [2022-09-13 06:09:00] URL: https://www.allhomes.com.au/svc/locality/searchallbyname?st=ACT&n=acton
#> [2022-09-13 06:09:00] Looking up division ID for suburb='Balmain, NSW'...
#> [2022-09-13 06:09:00] URL: https://www.allhomes.com.au/svc/locality/searchallbyname?st=NSW&n=balmain
#>   division state postcode value
#> 1    Acton   ACT     2601 14512
#> 2  Balmain   NSW     2041  7857
# }