When I try this url in a browser, it returns json data without a problem:
https://data.cityofgainesville.org/resource/gvua-xt9q.json?$where=report_date between '2015-01-10' and '2015-12-13'
But when I try to make the same call through Python:
response = requests.get('https://data.cityofgainesville.org/resource/gvua-xt9q.json?$where=report_date between '2015-01-10' and '2015-12-13')
data = response.json()
data = json_normalize(data)
data = pd.DataFrame(data)
... it returns a syntax error. Why would it work in a browser but not with a call from Python?
Appears to be a couple of issues. As noted in the comment, looks like you have a mismatched set of quotations.
Second, when the error is corrected, there is another error dealing with the SSL certificate. This is unrelated to the query syntax but something wrong either with
requestslibrary or the SSL certificate itself.Nevertheless, it appears that changing to
http://instead ofhttps://will work. So, give this a try: