Skip to content

Instantly share code, notes, and snippets.

// Example JSONP request with jQuery
$.ajax({
url: "http://api.espn.com/v1/sports/news/notes",
data: {
// enter your developer api key here
apikey: "{api key}",
// the type of data you're expecting back from the api
_accept: "application/json"
},
dataType: "jsonp",
{
"timestamp":"2012-11-21T16:40:18Z",
"resultsOffset":0,
"status":"success",
"resultsLimit":5,
"resultsCount":768,
"notes":[
{
"headline":"Cowboys Great Against Rookie QBs on Thanksgiving",
"id":8659824,
<?xml version="1.0"?>
<response>
<timestamp>2012-11-21T16:38:21Z</timestamp>
<resultsOffset>0</resultsOffset>
<status>success</status>
<resultsLimit>5</resultsLimit>
<resultsCount>768</resultsCount>
<notes>
<notesItem>
<headline>Cowboys Great Against Rookie QBs on Thanksgiving</headline>
{
"resultsOffset":0,
"resultsLimit":50,
"resultsCount":1,
"season":{
"olympicSeasonId":31,
"year":2008,
"type":2,
"description":"regular",
"startDate":"2008-08-06T07:00:00Z",
<?xml version="1.0"?>
<response>
<resultsOffset>0</resultsOffset>
<resultsLimit>50</resultsLimit>
<resultsCount>1</resultsCount>
<season>
<olympicSeasonId>31</olympicSeasonId>
<year>2008</year>
<type>2</type>
<description>regular</description>
{
"sports":[
{
"name":"hockey",
"id":70,
"leagues":[
{
"name":"National Hockey League",
"abbreviation":"nhl",
"id":90,
<?xml version="1.0"?>
<response>
<timestamp>2012-11-21T16:38:21Z</timestamp>
<resultsOffset>0</resultsOffset>
<status>success</status>
<resultsLimit>5</resultsLimit>
<resultsCount>768</resultsCount>
<notes>
<notesItem>
<headline>Cowboys Great Against Rookie QBs on Thanksgiving</headline>
{
"sports": [
{
"name": "basketball",
"id": 40,
"leagues": [
{
"name": "National Basketball Assoc.",
"abbreviation": "nba",
"id": 46,
<response>
<sports>
<sportsItem>
<name>basketball</name>
<id>40</id>
<leagues>
<leaguesItem>
<name>National Basketball Assoc.</name>
<abbreviation>nba</abbreviation>
<id>46</id>
<response>
<draft>
<description>NBA Draft 2013</description>
<numberOfRounds>2</numberOfRounds>
<rounds>
<roundsItem>
<round>1</round>
<description>Round 1</description>
<picks>
<picksItem>