As part of an ongoing commitment to openness and transparency, we at the USC have implemented the JSON API so that our data is more portable. As a government, we are, among other things, a provider of information, and our website is entirely made up of publicly-available information that we’re keen for people to access. We don’t know if our API will ever be used, but it’s here if anyone wants to try.[/et_pb_text][et_pb_text admin_label=”Explanation” background_layout=”light” text_orientation=”left”]
What is an API?
An API, very generally, is a way to open your application/program/database for others to use. Our API, like most JSON APIs, sends consistently-formatted streams of pure data over the Internet: information that’s difficult for people to read, but easy for computers to process. Here’s an example of what that looks like (it’s the JSON response for this page).
If you’ve ever used a web service that asks you to sign in with Facebook or Twitter, they’re using an API to do that. Similarly, Facebook Events on our Event Calendar are retrieved by tapping into Facebook’s API.
Okay, but how would this ever be useful?
Good question. It’s true that releasing information in this format is a bit abstruse, but hear me (us) out.
APIs are useful because they allow data to be harmonized — data from many places can aggregated in one place. Wouldn’t it be neat if you could see every open job application in London, for example? For that to happen, job postings published in different places would have to be brought together, which is only possible if the publishers of those job postings allow public access to their data. Career Central, for example, contains job listings that are restricted to those with a password. If we wanted job postings from Career Central to be pulled into our hypothetical ‘all-jobs-in-London’ portal, we would be out of luck.
Fortunately, we at the USC aren’t trying to build that portal. But we could a part of it someday.[/et_pb_text][et_pb_text admin_label=”Technical Details” background_layout=”light” text_orientation=”left”]
Most of the relevant documentation is explained in the ‘Other Notes‘ section of the JSON API’s Repository Page. However, here are some examples if you’re interested. If you have more questions, we’d love to hear from you.
- The Transportation Page
- Getting 5 Most Recent News Posts
- Getting titles, URLs, and custom fields for Volunteer Opportunities
- Getting Western Film Screenings for November 2014
*Note that currently we do not offer Club information or Facebook Event information from our API[/et_pb_text][/et_pb_column_inner][/et_pb_row_inner][/et_pb_column][/et_pb_section]