1

For example this url returns an error: https://api.data.gov/ed/collegescorecard/v1/schools?api_key=&fields=student.enrollment.all,school.name&school.state=AL
error: {"errors":[{"error":"field_not_found","input":"student.enrollment.all","message":"The input field 'student.enrollment.all' (in the fields parameter) is not a field in this dataset."}]}

But this url works: https://api.data.gov/ed/collegescorecard/v1/schools?api_key=&fields=school.name&school.state=AL
{"metadata":{"total":96,"page":0,"per_page":20},"results":[{"school.name":"Troy University-Online"},{"school.name":"Strayer University-Huntsville Campus"},{"school.name":"Virginia College-Montgomery"},{"school.name":"University of Phoenix-Alabama"},{"school.name":"ITT Technical Institute-Mobile"},{"school.name":"The University of Alabama"},{"school.nam.......

Are there some limitations on which fields you can return that are not documented? Am I doing something wrong?

1 Answer 1

1

When querying the API for objects that are not part of the school object, you need to specify a year of interest. For example, your query would be updated to the following for 2015 data:

https://api.data.gov/ed/collegescorecard/v1/schools?api_key=&fields=2015.student.enrollment.all,school.name&school.state=AL

Also, as an aside, if you are interested in enrollment, you may want to use the variable "YEAR.student.size" as YEAR.student.enrollment.all is only available for the 2000 dataset. Additional details may be found in our data dictionary posted here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.