(api info)
Usage
The following API endpoints are available:https://city-data-search.cbdm.app/api/single/[city]
https://city-data-search.cbdm.app/api/multi/[city1]&[city2]&...&[cityN]
For both methods, you can use "get-headers" as a valid city to get the column names.
Examples
- To get data for Irvine, CA: https://city-data-search.cbdm.app/api/single/irvine,ca
- To get data for Irvine, CA and New York, NY with headers: https://city-data-search.cbdm.app/api/multi/get-headers&irvine,ca&new+york,ny
Data Format
Single City
- 4.4 is the lowest daily temperature of the previous year;
- 15.0 is the median of the daily-low temperatures of the previous year;
- 18.2 is the median of the daily-average temperatures of the previous year;
- 22.8 is the median of the daily-high temperatures of the previous year;
- 36.7 is the highest daily temperature of the previous year;
Multi-city
Invalid City
If we cannot find a city for the given query, we will return an XML with the following data:Example for searching "invalid city name".
Google Sheets Integration
You can use the following formulas to import the data into Google Sheets.- To get data for a single city:
=IMPORTXML(CONCATENATE("https://city-data-search.cbdm.app/api/single/", {CITY}), "/data")
- To get data for multiple cities:
=IMPORTXML(CONCATENATE("https://city-data-search.cbdm.app/api/multi/", {CITY LIST}), "/multi/data")
You can see a complete example here: https://city-data-search.cbdm.app/api/example/