pub struct Location<'a>(/* private fields */);Expand description
Timezone and location API with city search and geocoding across 235,000+ cities in 240+ countries, returning latitude, longitude, IANA timezone, and DST-aware UTC offset. Coverage goes down to towns of a few hundred people and every administrative seat, so a rural birthplace resolves as reliably as a capital. The location layer for birth chart forms, horoscope apps, event planners, and any feature that needs place-to-coordinates resolution. Fields map directly to the astrology endpoints, with no separate geocoding service to call or pay for. One key covers every RoxyAPI domain, with Remote MCP and typed SDKs.
Implementations§
Source§impl Location<'_>
impl Location<'_>
Sourcepub async fn get_cities_by_country(
&self,
params: &GetCitiesByCountryParams,
) -> Result<GetCitiesByCountryResponse, Error>
pub async fn get_cities_by_country( &self, params: &GetCitiesByCountryParams, ) -> Result<GetCitiesByCountryResponse, Error>
Get cities in a country - Geocoding directory sorted by population
Returns all cities for a specific country, identified by ISO 3166-1 alpha-2 code (e.g. DE for Germany, FR for France, GB for United Kingdom, US for United States). Each city includes geographic coordinates, IANA timezone, and DST-aware UTC offset for direct use in astrology birth chart, horoscope, transit, and panchang calculations. Cities sorted by population with the largest metropolitan areas first.
GET /location/countries/{iso2}
Sourcepub async fn list_countries(
&self,
params: &ListCountriesParams,
) -> Result<ListCountriesResponse, Error>
pub async fn list_countries( &self, params: &ListCountriesParams, ) -> Result<ListCountriesResponse, Error>
List all countries - ISO codes and city coverage
Returns every country with ISO 3166-1 alpha-2 and alpha-3 codes, plus the number of searchable cities per country. Use this endpoint to build country dropdown menus, regional filters, or to check city coverage before querying a birth location. Countries are sorted alphabetically by name. Covers Europe, Americas, Asia, Middle East, Africa, and Oceania.
GET /location/countries
Sourcepub async fn search_cities(
&self,
params: &SearchCitiesParams,
) -> Result<SearchCitiesResponse, Error>
pub async fn search_cities( &self, params: &SearchCitiesParams, ) -> Result<SearchCitiesResponse, Error>
Search cities worldwide - Geocoding autocomplete with coordinates and timezone
Turn a place name into coordinates, an IANA timezone and a DST-aware UTC offset, across 235,000+ cities and towns in 240+ countries. Coverage reaches rural towns of a few hundred people and every administrative seat, so a birthplace outside a major metro resolves as reliably as a capital. Matching is case-insensitive, accent-insensitive and partial, so ber matches Berlin, Bern and Bergen, native scripts are transliterated, and historic names resolve to the current place, so bombay returns Mumbai and peking returns Beijing. Results are ordered by match quality first and population second, so an exactly named small town is never buried under a larger city that merely shares its opening letters. Built for birth chart location pickers, horoscope apps, event scheduling, and any feature that needs place-to-coordinates resolution.
GET /location/search