expandURL: updated api

@russellholt