The best way to get to know our project listings API is to first play around with our
front-end project search functionality. Reason being that our project listings API offers programmatic access to the same exact functionality and information as our front-end search. So check-out our front-end project search functionality. Note...
For example: This is the front-end search results URL for classroom projects in Charlotte, North Carolina: http://www.donorschoose.org/donors/search.html?state=NC&community=10007:3 ...and this is the JSON request for the same project listings: http://api.donorschoose.org/common/json_feed.html?state=NC&community=10007:3&APIKey=DONORSCHOOSE The request is aimed at a different endpoint (http://api.donorschoose.org/common/json_feed.html?) and an API key has been tacked onto the end as an additional parameter (&APIKey=DONORSCHOOSE), but the request arguments are otherwise the same. Heads up that the first 70 lines of the response are blank so if you're viewing the response in your browser, you'll likely have to scroll a bit to get to the good stuff. (We know this is a bit annoying and hope to fix it soon.) Similarly, this is the front-end search results URL for Health & Sports-related classroom projects from charter high school classrooms: http://www.donorschoose.org/donors/search.html?gradeType=4&subject2=-1&schoolType=1 ...and this is the JSON request: http://api.donorschoose.org/common/json_feed.html?gradeType=4&subject2=-1&schoolType=1&APIKey=DONORSCHOOSE A front-end keyword search for already-completed yoga-related projects: http://www.donorschoose.org/donors/search.html?keywords=yoga&historical=true ...and the JSON request: http://api.donorschoose.org/common/json_feed.html?keywords=yoga&historical=true&APIKey=DONORSCHOOSE You get the picture! This awesome API console from Apigee is also very useful in helping to construct and test API interactions. So if you’re wondering whether you can request certain specific types of projects via the API, try to filter for just those kinds of projects using the front-end search UX. If you can do it there, you can almost certainly do it via the API. If you’re wondering whether you can get a specific project attribute from the API, check out the project listings and project details screens via the front-end search UX first. Once you’ve got a general handle on what you can request from the API and the kind of information you’ll get back, you can dive into the full details of how API requests and responses can be structured. |