sfpark api
By traviscj
- 1 minutes read - 82 wordsI recently came to learn of the SFpark API, which lets one make queries like:
LAT=37.787702
LONG=-122.407796
curl "http://api.sfpark.org/sfpark/rest/availabilityservice?lat=${LAT}&long=${LONG}&radius=0.25&uom=mile&response=json" | pbcopy
pbpaste | jq '.AVL[] | select (.TYPE | contains("OFF"))'
and get a response including records like:
{
"TYPE": "OFF",
"OSPID": "950",
"NAME": "Union Square Garage",
"DESC": "333 Post Street",
"INTER": "Geary between Stockton & Powell",
"TEL": "(415) 397-0631",
"OPHRS": {
"OPS": {
"FROM": "7 Days/Wk",
"BEG": "24 Hrs/Day"
}
},
"OCC": "381",
"OPER": "670",
"PTS": "1",
"LOC": "-122.407447946,37.7876789151"
}
Pretty cool!