从analytics.usa.gov API中提取特定日期

时间:2018-12-02 03:50:59

标签: python api

第一次必须查询API。具体来说,我正在尝试访问以下API:https://analytics.usa.gov/developer,并从中下载11月22日星期四的“域”数据集的.csv报告。到目前为止,我已经尝试执行以下代码:

response = requests.get(https://api.gsa.gov/analytics/dap/v1/reports/domain/data?api_key=blablabla)
print(response.status_code)

我得到了404状态。 1)谁能解决404错误?和2)如何访问报告的特定日期?

1 个答案:

答案 0 :(得分:0)

we are actually working this week on being able to add a filter for date. Check back in the coming weeks as we implement and alter the documentation. As of this moment, filtering by date is not possible.

as for the 404... we'll look into that today. not sure why that's happening yet.