Lists of Nobel Prizes and Laureates

API Examples



Below is a simple example of php code that uses curl to retrieve data from the API in order to list the Nobel Laureates in Physiology or Medicine between 1990 and 1994. For simplicity, it's kept short and has no error handling.

The php code:


# Base URL for the API
$url  '';
# List Nobel Prizes in Medicine from 1990 to 1994
$url .= '?category=medicine&year=1990&yearto=1994';

# Retreieve the result from the API using CURL
$ch curl_init();
$string curl_exec($ch);

# Read the JSON output into an associative array
$result  json_decode($stringtrue);

# Find out how many years that are listed
$numyears count($result['prizes']);

for (
$i 0$i $numyears$i++) {

# Print out the category and year
$cat $result['prizes'][$i]['category'];
$year $result['prizes'][$i]['year'];
"<b>$cat $year</b><br>\n";

# Find out how many laureates this category and year
$numlaur count($result['prizes'][$i]['laureates']);

  for (
$j 0$j $numlaur$j++) {

#   Print out the names
$firstname $result['prizes'][$i]['laureates'][$j]['firstname'];
$surname $result['prizes'][$i]['laureates'][$j]['surname'];
"$firstname $surname <br>\n";




The result:

medicine 1994
Alfred G. Gilman
Martin Rodbell

medicine 1993
Richard J. Roberts
Phillip A. Sharp

medicine 1992
Edmond H. Fischer
Edwin G. Krebs

medicine 1991
Erwin Neher
Bert Sakmann

medicine 1990
Joseph E. Murray
E. Donnall Thomas



The open data project at was supported in 2012 by Vinnova.


Share this:
To cite this page
MLA style: "API Examples". Nobel Media AB 2014. Web. 23 Jun 2017. <>