DonorsChoose.org: Teachers ask. You choose. Students learn.
An online charity connecting you to classrooms in need.
home > help > DonorsChoose.org API

Help

DonorsChoose.org Classroom Project Listings API

The DonorsChoose.org Classroom Project Listings API allows developers to add DonorsChoose.org's classroom projects to their website or application using their own search criteria, page layout and branding. In a nutshell, a developer can make an HTTP request—constructed very similarly to a regular DonorsChoose.org front-end Search Projects functionality—and receive classroom project listings in a JSON response.

Table of Contents

If you only read one thing...

If you choose to make use of this API, please take a minute to subscribe to our API email list. This will enable us to notify API users of important updates and service advisories. We expect to email our list less than once a month and you can unsubscribe at any time.

What is JSON?

JSON (JavaScript Object Notation) is a simple, lightweight data format that represents arrays and key/value pairs, and is often used in place of XML. While JSON was originally formulated to take advantage of Javascript's eval function, libraries are now available for Java, PHP, Actionscript, and many others. You can learn more and download code here: http://www.json.org/

How can I make an HTTP request?

The easiest way to build your first request is to start by searching for projects on our site. For example, if you'd like to see a list of Arts & Music projects, the search results page address looks like this:

To view the same list in JSON format, simply change the URL like so:

Notice that in addition to changing the sub-domain from www. to api. and the URI from /donors/search.html to /common/json_feed.html, you will need to include an API Key on the query string.

How can I receive a unique API key?

Feel free to use the default API key "DONORSCHOOSE" for evaluative or testing purposes. However, during periods of high web traffic, we may temporarily disable API requests using the default key. This is to ensure that maximum server resources are available both to front-end users of DonorsChoose.org and those developers using our API in "production" integration environments. When the default key is temporarily disabled, an empty project set and 403 header is returned.

To ensure API connectivity for your site or application, please request a unique API key from us via email: apikey (at) donorschoose (dot) org. Please include your contact information, as well as your best estimate of the daily and peak number of requests your app will make against the API.

We intend to quickly approve any API key request that doesn't violate our User Agreement and we'll only contact you directly if something comes up down the line. We will use the traffic estimates you provide for capacity planning purposes.

If you'd also like to receive news about the latest updates and improvements to our API, please join our user group at http://tech.groups.yahoo.com/group/donorschoose-api/. We expect to email our list less than once a month.

What can I include in my HTTP request?

We recommend that you use our front-end Search Projects functionality at DonorsChoose.org as a starting point for building out your requests. If you would like to explore the search criteria available to you in more depth, refer to the appendix below.

In addition, the following query string parameters are available:

callbackIf you wish to wrap your response in a callback function, include the name here
indexBy default, the start index of the result set is 0; for example, by setting index=10 and max=10, you can return rows 10-19.
maxBy default, the maximum number of projects returned is 10; you can request up to 50 rows at a time.

How can I read the JSON response?

An example of a JSON response:

{"searchTerms":"Art & Music",
"searchURL":"http://www.donorschoose.org/donors/search.html?subject1=-1&utm_source=api&utm_medium=feed&utm_content=searchlink&utm_campaign=DONORSCHOOSE",
"totalProposals":"1694",
"index":"0",
"max":"10",
"proposals":[
	{
	"id":"259649",
	"proposalURL":"http://www.donorschoose.org/donors/proposal.html?id=259649&utm_source=api&utm_medium=feed&utm_content=bodylink&utm_campaign=DONORSCHOOSE&zone=0",
	"fundURL":"https://secure.donorschoose.org/donors/givingCart.html?proposalid=259649&donationAmount=&utm_source=api&utm_medium=feed&utm_content=fundlink&utm_campaign=DONORSCHOOSE",
	"imageURL":"",
	"title":"Self Critique",
	"shortDescription":"My students need a camcorder to evaluate their speeches and debates. Since the self is the most difficult critic, my skilled orators need the opportunity to view themselves in order to see what others see.",
	"fulfillmentTrailer":"My students need a camcorder to evaluate their speeches and debates. ",
	"percentFunded":"88",
	"costToComplete":"52.94",
	"matchingFund":{"matchingKey":"","name":"","logoURL":"","faqURL":"","amount":"0.0"},
	"totalPrice":"453.0",
	"teacherName":"Ms. H",
	"gradeLevel":{"id":"Grades 9-12","name":"4"},
	"povertyLevel":"High Poverty",
	"schoolName":"West Charlotte High School",
	"city":"Charlotte",
	"state":"NC",
	"zip":"28216",
	"zone":{"id":"301","name":"North Carolina"},
	"subject":{"id":"1","name":"Performing Arts","groupId": "1"},
	"resource":{"id":"2","name":"Technology"},
	"expirationDate":"2009-07-29"
	},
	...
]}

All fields are returned as strings; please perform a cast to compare dates, dollar amounts, and percentages.

Please note: If you wish to wrap your JSON object in a callback function, include "callback" in your request query string (see "What can I include in my HTTP request?" above).

Project Listing Overview Elements:

searchTermsA text description of your search criteria, such as "Arts & Music"
searchURLA url which can be used to link back to DonorsChoose.org's search results page, such as http://www.donorschoose.org/donors/search.html?subject1=-1&utm_source=api&utm_medium=feed&utm_content=searchlink&utm_campaign=DONORSCHOOSE
totalProposalsTotal number of projects found
indexStarting index of project rows returned
maxNumber of project rows returned; default is 10, capped at 50
proposalsAn array of project listings; per-project fields are described in the table below; will be returned empty if there are no project listings matching the criteria in the request

Per-Project Listing Fields:

FieldTypeDescriptionAlways provided?**
idlongUnique project ID #Yes
proposalURLstringPermalink to project details page, e.g. http://www.donorschoose.org/donors/proposal.html?id=259649&utm_source=api&utm_medium=feed&utm_content=bodylink&utm_campaign=DONORSCHOOSE&zone=0Yes
fundURLstringPermalink to commence donating to a project, e.g. https://secure.donorschoose.org/donors/givingCart.html?proposalid=259649&donationAmount=&utm_source=api&utm_medium=feed&utm_content=fundlink&utm_campaign=DONORSCHOOSEYes
imageURLstringLink to teacher-provided classroom photo, either a GIF or JPG with a max width of 210 px, eg. http://www.donorschoose.org/images/user/uploads/small/12220/u12220_sm.jpg. As a safety precaution, classroom photo is not provided if the request includes county, district, community, city, or school search parameters.No
titlestringProject titleYes
shortDescriptionstringShort project summary (excerpted from the project essay) Yes
fulfillmentTrailerstringShort description of project material needsYes
synopsisstringUnabridged project essay. Paragraph ends are delimited with "<br/><br/>".No
percentFundedintegerPercent of funding project has already received (between 1 and 100) Yes
costToCompletedoubleRemaining amount needed to fully fund the project Yes
totalPricedoubleTotal cost of the project Yes
teacherNamestringTeacher's title plus last name initial, eg. Mr. L, Mrs. B (full name not available for privacy reasons)Yes
gradeLevel
id
name

integer
string
Classroom grade level Yes
povertyLevelstringPoverty level refers to the percentage of students at a given school who qualify for free or reduced lunch, which is considered a measure of economic need. Yes
schoolNamestringAs a safety precaution, school name is not provided if a classroom photo is availableNo
citystringAs a safety precaution, city is not provided if a classroom photo is availableNo
zipstringAs a safety precaution, zip is not provided if a classroom photo is availableNo
statestringTwo letter abbreviation, e.g. CA for California Yes
zone
id
name

integer
string
Usually corresponds to state names (eg. Wyoming), but sometimes refers to sub-state regions (eg. California - Northern, Chicago) Yes
subject
id
name
groupId

integer
string
integer
Primary subject area Yes
resource
id
name

integer
string
Type of classroom materials requested, e.g. Classroom Supplies, Class Trips, Classroom VisitorsYes
expirationDatedateProject expiration date Yes
matchingFund matchingKey
name
logoURL
faqURL
amount

string
string
string
string
double
If available, the following fields are provided:
Matching sponsor's internal identifier
Matching sponsor's name
URL of Matching sponsor's logo image
URL of popup summary of sponsor's matching terms Amount contributed by sponsor when percentFunded reaches 50%
No
fundingStatus string Either "needs funding" or "funded" No
thankYouAssets
interimThankYou
photos
resultsLetter

string
array
string
If available, the following fields are provided:
Interim Thank You Letter
Photos (an array of URL's)
Results Letter
No

** If data for a field is not provided for given project, the field will be empty in the JSON response.

APPENDIX A: Request Parameters

http://api.donorschoose.org/common/json_feed.html

API Specific Parameters

There are six parameters available specifically to this API:

APIKey (required)Please request a unique APIKey from api_key (at) donorschoose (dot) org. You may also use DONORSCHOOSE for testing purposes.
callback (optional)If you wish to wrap your response in a callback function, include the name here
start (optional)By default, the start index of the result set is 0; for example, by setting start=10 and max=10, you can return rows 10-19.
max (optional)By default, the maximum number of projects returned is 10; you can request up to 50 rows at a time.
showSynopsis (optional)To show the synopsis for each project listing set this to true.
showFacetCounts (optional)To show facet counts set this to true. They will appear after the project listings. See Appendix B for more details.

In addition, please include at least one search parameter, as described below.

Search Parameters

Please note that search parameters are frequently updated; for the most up-to-date options, please use DonorsChoose.org's Search Projects functionality as a starting point.

Keyword Search

Example: keywords=Shakespeare
Please url-encode the query string
Use quotes to search for an exact phrase match
Fields included in keywords search
  • id
  • title
  • synopsis (full length project essay; not returned in JSON)
  • short description
  • fulfillment trailer
  • school name
  • teacher's first name (not returned in JSON)
  • teacher's last name (only initial returned in JSON)
  • city
  • county (not returned in JSON)
  • district (not returned in JSON)
  • ward/neighborhood (not returned in JSON)
  • statecode (e.g. tx)
  • zip (not returned in JSON)
  • zone name
  • subject name

Project Id

Example: id=259649

Returns data for a specific project.

Subject

Example: subject1=-1, subject1=11

The numeral preceding = indicates the subject group; the numeral after = indicates the subject. If you would like to see results for the entire subject group, use (-) before the subject group number, i.e. subject1=-1

Art & Music
  • Performing Arts
  • Visual Arts
  • Music
subject1=-1
  • subject1=1
  • subject1=11
  • subject1=12
Physical Education
  • Sports
  • Health & Wellness
  • Nutrition
  • Gym & Fitness
subject2=-2
  • subject2=2
  • subject2=27
  • subject2=28
  • subject2=29
Literacy & History
  • Literacy
  • Economics
  • Social Sciences
  • Foreign Languages
  • English as a Second Language
  • Literature / Creative Writing
  • History / Geography
  • Civics / Government
subject3=-3
  • subject3=10
  • subject3=14
  • subject3=15
  • subject3=22
  • subject3=23
  • subject3=3
  • subject3=9
  • subject3=13
Math & Science
  • Health & Life Science
  • Applied Science
  • Environmental Science
  • Mathematics
subject4=-4
  • subject4=4
  • subject4=6
  • subject4=7
  • subject4=8
  • Other Areas
    • Student Rewards
    • Early Development
    • Other
    • Community Service
    • Special Needs
    • Character Education
    • College / Career Prep
    • Extracurricular / After-School
    • Parent / Community Involvement
    subject5=-5
    • subject5=5
    • subject5=18
    • subject5=19
    • subject5=21
    • subject5=23
    • subject5=26
    • subject5=16
    • subject5=17
    • subject5=20

    Also note that you can search by subject name using a keywords search.

    Special Categories

    Some Received
    Projects that have already received partial donations
    partiallyFunded=yes
    None Yet
    Projects that haven't yet received a donation
    partiallyFunded=no
    High Level of Poverty
    Projects from high need and high poverty schools (40% or more students receive free lunch)
    highLevelPoverty=true
    Never Before Funded
    Projects from teachers that have never had a project funded... yet
    teacherNotFunded=true

    Cost to Complete

    $99 or lesscostToComplete=1
    $100-$200costToComplete=2
    $200-$1,000costToComplete=3
    $1,000-abovecostToComplete=4

    Cost to Complete Range

    Example: costToCompleteRange=0+TO+400

    Please note that when costToCompleteRange is set, costToComplete is ignored

    Resource

    BooksproposalType=1
    TechnologyproposalType=2
    SuppliesproposalType=3
    TripsproposalType=4
    VisitorsproposalType=5
    OtherproposalType=6

    Grade Level

    Grades PreK-2gradeType=1
    Grades 3-5gradeType=2
    Grades 6-8gradeType=3
    High SchoolgradeType=4
    Adult EdgradeType=5

    Resource Usage

    EssentialresourceUsage=1
    EnrichmentresourceUsage=2

    Teacher Type

    Teach For AmericateacherType=1

    School Type

    Charter SchoolschoolType=1
    Magnet SchoolschoolType=4
    Year Round SchoolschoolType=5

    Challenge

    Example: challengeId=18369

    Please note that, in contrast to the challenge page (http://www.donorschoose.org/donors/viewChallenge.html?id=18369), only projects that still need funding will be included in the JSON feed.

    Matching Grant

    Example: matchingId=6

    Please use the "Match Offers" filter on our Search Projects page to get the matching grant value you need.

    Zone (State or sub-state regions)

    Alabamazone=311
    Alaskazone=401
    Arizonazone=421
    Arkansaszone=324
    California (Northern)zone=402
    California (Southern)zone=411
    Coloradozone=422
    Connecticutzone=101
    Delawarezone=111
    Floridazone=312
    Georgiazone=313
    Hawaiizone=413
    Idahozone=241
    Illinois (Chicago)zone=201
    Illinois (State)zone=202
    Indianazone=203
    Iowazone=221
    Kansaszone=222
    Kentuckyzone=211
    Louisianazone=322
    Mainezone=122
    Marylandzone=112
    Massachusettszone=121
    Michiganzone=212
    Minnesotazone=242
    Mississippizone=314
    Missourizone=223
    Montanazone=243
    Nebraskazone=224
    Nevadazone=412
    New Hampshirezone=123
    New Jerseyzone=102
    New Mexicozone=423
    New York (City)zone=103
    New York (State)zone=104
    North Carolinazone=301
    North Dakotazone=244
    Ohiozone=213
    Oklahomazone=323
    Oregonzone=403
    Pennsylvaniazone=113
    Rhode Islandzone=124
    South Carolinazone=303
    South Dakotazone=245
    Tennesseezone=302
    Texaszone=321
    Utahzone=424
    Vermontzone=125
    Virginiazone=304
    Washingtonzone=404
    Washington D.C.zone=114
    West Virginiazone=214
    Wisconsinzone=204
    Wyomingzone=246

    To search by state code (e.g. TX) you can either do a keyword search or use the stateCode parameter (e.g. stateCode=NC).

    Zip code

    You can search by zip code using the keyword search field.

    Community (city, county, district, or special)

    Example: community=7%3a1

    Please use the "Community" filter on our Search Projects page to get the community values you need. If you cannot find a particular city, county, or district through the Search Projects functionality, please contact us for help.

    In some cities you can search by ward (e.g. Washington DC) or neighborhood (e.g. New York City, Chicago).

    Please note that you can also use a keywords search to find projects in any community.

    Finally, you can use the cityName parameter for city and the countyName parameter for county.

    School

    Example: school=472

    Please use the Search Projects functionality to identify a specific school.

    Also note that you can search by school name using a keywords search.

    Sorting

    You can sort your results by:

    Urgency
    Shows projects with higher urgency at the top
    sortBy=0
    Poverty
    Shows projects from schools with the highest levels of poverty at the top
    sortBy=1
    Cost
    Shows projects with the lowest cost to complete at the top
    sortBy=2
    Popularity
    Shows projects with higher numbers of donors at the top
    sortBy=4

    APPENDIX B: Facet Counts

    An example of a JSON response with facet counts:

    {
    ...
    "proposals":[...],
    "facetCounts":{
    "location":{"zone":{"Illinois (State)":24,"South Carolina":82,"Rhode Island":12,"New Mexico":1,"California (South)":78,"Alabama":9,"Florida":43,"New Hampshire":1,"Massachusetts":17,"Tennessee":12,"Louisiana":34,"Maryland":14,"California (North)":81,"Ohio":24,"West Virginia":2,"Idaho":6,"Virginia":25,"Mississippi":23,"Texas":55,"Vermont":1,"Kansas":5,"Michigan":17,"New Jersey":16,"Colorado":7,"Pennsylvania":52,"Maine":9,"Illinois (Chicago)":67,"Arkansas":6,"Missouri":22,"New York (City)":132,"Iowa":8,"Oregon":15,"North Dakota":2,"Indiana":51,"Washington D.C.":12,"Wisconsin":24,"Nevada":59,"Minnesota":7,"Washington":22,"Hawaii":5,"Connecticut":22,"Montana":2,"Oklahoma":57,"North Carolina":132,"Arizona":14,"New York (State)":54,"Kentucky":15,"Alaska":6,"Georgia":24,"Utah":18,"Nebraska":1}},
    "subject":{"Health & Sports":15,"Math & Science":148,"Other Areas":360,"Art & Music":{"Performing Arts":386,"Visual Arts":807,"Music":439},"Literacy & History":513},
    "proposalType":{"Supplies":631,"Books":93,"Trips":1,"Other":127,"Technology":575},
    "costToComplete":{"$1000-above":114,"$100-$200":130,"$200-$1000":1142,"$0-$99":41},
    "partiallyFunded":{"Some Received":558,"None Yet":869},
    "teacherNotFunded":645,
    "resourceUsage":{"Essential":568,"Enrichment":859},
    "gradeType":{"Grades 9-12":280,"Grades PreK-2":406,"Adult Ed":6,"Grades 3-5":482,"Grades 6-8":253}, 
    "teacherType":{"NY Teaching Fellow":9,"Teach For America":18}, 
    "schoolType":{"NLNS":23,"Year Round":114,"Charter":84,"Magnet":124}
    }
    }
    

    If a count is not specified, that means it's zero.

    Different facet categories are treated differently. Examples follow:

    Location

    "location":{"zone":{"AR":574, "AK":45, ..., "WY":68}}

    If zone=311 in the search parameters:

    "location":{
      "county":{"Baldwin":4,"Bibb":1,...,"Tuscaloosa":1},
      "district":{"Albertville City School Dist":23,"Auburn City School District":1,...,"Tuscumbia City School District":2}
      "city":{"Adamsville":1,"Albertville":23,"Wilmer":1 }
    }
    

    Subject

    "subject":{"Health & Sports":1231,"Math & Science":1373,"Other Areas":3594,"Art & Music":1782,"Literacy & History":5232}

    If subject1=-1 in the search parameters:

    "subject":{"Health & Sports":14,"Math & Science":137,"Other Areas":359,"Art & Music":{"Performing Arts":381,"Visual Arts":827,"Music":448},"Literacy & History":523}

    If subject1=1 in the search parameters:

    "subject":{"Health & Sports":8,"Math & Science":16,"Other Areas":80,"Art & Music":{"Visual Arts":34,"Music":155},"Literacy & History":128}

    Note that "Performing Arts" is missing in the above example.

    Resource

    "proposalType":{"Books":104,"Technology":579,"Supplies":642,"Trips":1,"Visitors":2,"Other":126}

    If proposalType=1 in the search parameters:

    "proposalType":{}

    Facet counts for Cost to Complete (key: costToComplete), Donations (key: partiallyFunded), Resource Type (key: resourceUsage), and Grade Level (key: gradeType) follow the same scheme.

    Never Before Funded

    "teacherNotFunded":1728

    If teacherNotFunded=true in the search parameters, this field won't be shown.

    School Affiliation

    "schoolType":{"Charter":519,"Magnet":969,"Year Round":758,"NLNS":174}

    If schoolType=1 in the search parameters:

    {"Magnet":7,"Year Round":45,"NLNS":30}

    Facet counts for Teacher Affiliation (key: teacherType) follow the same scheme.

    APPENDIX C: Sample requests

    Projects needing less than $200 to complete in classrooms with high level of poverty:
    http://api.donorschoose.org/common/json_feed.html?costToCompleteRange=0+TO+200&highLevelPoverty=true &APIKey=DONORSCHOOSE

    Southern California projects with an Arts & Music focus:
    http://api.donorschoose.org/common/json_feed.html?zone=411&subject1=-1&APIKey=DONORSCHOOSE

    Projects from Canoga Park:
    http://api.donorschoose.org/common/json_feed.html? keywords=%22Canoga+Park%22&APIKey=DONORSCHOOSE

    Topical / newsworthy projects:
    http://api.donorschoose.org/common/json_feed.html?keywords=president&APIKey=DONORSCHOOSE
    http://api.donorschoose.org/common/json_feed.html?keywords=climate+change&APIKey=DONORSCHOOSE

    Partially funded projects belonging to Teach For America teachers
    http://api.donorschoose.org/common/json_feed.html?partiallyFunded=true&teacherType=1&APIKey=DONORSCHOOSE

    Projects from New York City charter schools
    http://api.donorschoose.org/common/json_feed.html?zone=103&schoolType=1&APIKey=DONORSCHOOSE

    Projects for technology resources for high school students
    http://api.donorschoose.org/common/json_feed.html?proposalType=2&gradeType=4&APIKey=DONORSCHOOSE

    How can I contact the DC.org tech team with any questions
    about using the API?

    We'd love to hear from you! Contact us at apiquestion (at) donorschoose (dot) org.

    Approved by
    Better Business Bureau: Accredited Charity Charity Navigator: Highest Rating
    Featured by
    Wall Street Journal CNN NPR
    National Leadership Partners
    U.S. Cellular Chase
    National Partners
    HP -- SONIC Drive-In