Issues with https://api.usaspending.gov/api/v2/bulk_download/awards/ ?

Comments

4 comments

  • Official comment
    Avatar
    AmandaC - Treasury

    Hi Justin - Thank you for your question.

    If you are using the USAspending API web page to run your query, the 500 error is a known issue.

    We were able to send a successful request through a third-party application, Postman, with the following JSON query:
    {        
        "filters": {
                "prime_award_types": ["A", "B", "C", "D"],
                "agency": "all",
                "date_type": "action_date",
                "date_range": 

    {                 "start_date": "2019-10-01",                 "end_date": "2020-09-30"             }

            }
    }

    Please let us know if you have any other questions or concerns.

    Comment actions Permalink
  • Avatar
    Justin Wyss-Gallifent

    Is this "known issue" going to be fixed? I'm building out something which needs to make calls to the API, so going through some third-party software like Postman won't help.

    If not then this API endpoint is largely useless as an actual API endpoint.

    0
    Comment actions Permalink
  • Avatar
    Justin Wyss-Gallifent

    I have figured this out. Evidently the payload needs to be passed to requests as json and not as data:

    r = requests.post(url = myurl,json = mydata)
    0
    Comment actions Permalink
  • Avatar
    Service Desk - Lisa

    Hi Justin,

    That's correct. 

    We've had users experience the same issue before, here is a reference that should be helpful:

    https://github.com/fedspendingtransparency/usaspending-api/issues/2061#issuecomment-537565181

    We also want to assure you the endpoint is working.

     

    Please let us know if you have any other questions or concerns.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk