From your aviation geek:
METAR is essentially a local weather report shorthand.
The first 4 letters of the METAR is the ICAO location code (kinda like the YYZ, LAX, JFK that we see, but a different system), so I guess to whoever is developing the script can just ask for the location code (which often corresponds to a local airport, e.g., CYYZ for Toronto Pearson).
Quick Google search and I found:
http://weather.noaa.gov/weather/metar.shtml, which seems to be a reliable source.