How to use New York Times Article Search API

From Data-gov Wiki

Jump to: navigation, search
Infobox (How-To) edit with form
  • name: How to use New York Times Article Search API

  • description: step by step tutorial for using the NYT API
  • creator(s): Tim Lebo
  • created: 2010/04/07
  • modified: 2010-4-12


The New York Times Article Search API is one of eleven New York Times Search APIs from New York Times.

http://developer.nytimes.com/docs/article_search_api describes the parameters that can be used in an HTTP request.

The API Request Tool at http://prototype.nytimes.com/gst/apitool/index.html can be used to submit queries and view pretty-printed results. However, it does not help you construct the query string. This page describes how to construct the query string.

To execute queries outside of the API Request Tool, you will need to register for an Article Search API key and include it as part of the query string. You would then replace the #### in the examples below with the api key that you receive. You can get an API key from http://developer.nytimes.com/ (get API key).

New York Times Linked Data includes a property nyt:search_api_query whose literal value can be used to request related articles.

Contents

Simplest query

The simplest query is to provide a single keyword. Be default, the fields body, byline, date, title, and url will be searched for the keyword you provide. The first ten results will be returned. There is no way to change the number of results returned. By default, the matching articles will be described with their body, byline, date, title, and url (the same fields that are searched). In this example, there are 24,602 articles with the token "smoking" in their body, byline, date, title, OR url. For brevity, all examples here omit the middle eight result articles.

query=smoking
http://api.nytimes.com/svc/search/v1/article?format=json&query=smoking&api-key=####
{
  "offset": "0",
  "results": [
    {
      "body": "FROM the late 1970s through the early ’90s, despite some wide financial mood swings, Calvin Klein occupied an infinity of clean white space in the design world. Everything the brand touched was reflective of the spare architectural minimalism (that had yet to be mass produced by places like West Elm). The sumptuously erotic black-and-white",
      "byline": "By CINTRA WILSON",
      "date": "20100325",
      "title": "CRITICAL SHOPPER | CALVIN KLEIN; New Bow on a Minimal Box",
      "url": "http:\/\/www.nytimes.com\/2010\/03\/25\/fashion\/25CRITIC.html"
    },
    ...
    {
      "body": "Onstage Cuisine On March 18 to 20 at 8 p.m. and March 21 at 2:30 p.m. at La MaMa E.T.C., 74A East Fourth Street (Second Avenue), there will be a production of “La Vie Matérielle” by Irina Brook based on the writings of Marguerite Duras and Virginia Woolf , in which members of the cast will cook onstage, with leftovers available for",
      "byline": "By FLORENCE FABRICANT",
      "date": "20100317",
      "title": "Dining Calendar",
      "url": "http:\/\/www.nytimes.com\/2010\/03\/17\/dining\/17fcal.html"
    }
  ],
  "tokens": [
    "smoking"
  ],
  "total": 24602
}

Getting the next 10 results

Adding the parameter offset will get results other than the first 10 articles. To get the second ten, use offset=1, and so on.

query=smoking
offset=1
http://api.nytimes.com/svc/search/v1/article?format=json&query=smoking&offset=1&api-key=#### 
{
  "offset": "1",
  "results": [
    {
      "body": "SOME mac and cheese or cornbread with your barbecue? Not at Fatty ’Cue, opening March 23 in Williamsburg, Brooklyn. Try the celery ribbons with yuzu and preserved Chinese cabbage instead. “I love barbecue, but I quickly get palate fatigue,” said Zakary Pelaccio, a partner and the culinary director for the expanding Fatty",
      "byline": "By FLORENCE FABRICANT",
      "date": "20100317",
      "title": "Southeast Asia Is Inspiration at Fatty \u2018Cue in Brooklyn",
      "url": "http:\/\/www.nytimes.com\/2010\/03\/17\/dining\/17fatty.html"
    },
    ...
    {
      "body": "WASHINGTON -- By a unanimous vote, the Senate on Thursday passed a bill to eliminate mail-order cigarettes, a victory for public health advocates and a defeat for the New York Indian tribe that dominates the business. The measure was approved by the House last spring but then stalled in the Senate amid a lobbying campaign by the tribe, the Seneca",
      "byline": "By DAVID D. KIRKPATRICK",
      "date": "20100313",
      "title": "Senate Backs Ban on Mail-Order Cigarettes in Setback for Tribe",
      "url": "http:\/\/query.nytimes.com\/gst\/fullpage.html?res=9402E3DA143DF930A25750C0A9669D8B63"
    }
  ],
  "tokens": [
    "smoking"
  ],
  "total": 24602
}

Multi-token keyword search within a specific field

In the simplest query, we searched articles' body, byline, date, title, and url and returned the same fields (body, byline, date, title, and url). We can narrow our search to a specific field. Although only a certain field is searched, the matching articles' body, byline, date, title, and url will still be returned in the results. Multi-token keywords can be wrapped in double quotes (and then URL-encoded). In this example, the phrase "Letter by Letter" was used 7 times since 1981.

query=title:"Letter by Letter"
http://api.nytimes.com/svc/search/v1/article?format=json&query=title%3A%22Letter+by+Letter%22&api-key=####
{
  "offset": "0",
  "results": [
    {
      "body": "Hugh Raffles was taking a shower in his Manhattan apartment when a three-inch-long water bug dropped from the ceiling and landed at his feet. His first reaction was one that might be expected. “I admit it: I screamed,” he writes in “Insectopedia,” his new compendium of thoughts about the creepy-crawly. “Wouldn’t",
      "byline": "By JANET MASLIN",
      "date": "20100325",
      "title": "BOOKS OF THE TIMES; Creepy-Crawly, Letter by Letter",
      "url": "http:\/\/www.nytimes.com\/2010\/03\/25\/books\/25book.html"
    },
    ...
    {
      "body": "It began in 1978, Bob J. Frye recalled, as a way to break the ice at the beginning of the semester for his English composition class at Texas Christian University, in Fort Worth. He would write a letter introducing himself to the class, then ask each student to write a letter to him, once a week. No grades on the letters; just an exercise. Twenty",
      "byline": "By David W. Chen",
      "date": "19980405",
      "title": "BLACKBOARD: CLASS CORRESPONDENCE; Studying English, Letter by Letter",
      "url": "http:\/\/www.nytimes.com\/1998\/04\/05\/education\/blackboard-class-correspondence-studying-english-letter-by-letter.html"
    }
  ],
  "tokens": [
    "title:\"Letter by Letter\""
  ],
  "total": 7
}

Multiple keyword search within specific fields

Adding a second field-scoped keyword will only return articles that match both conditions. In this example, the seven articles are cut down to two because five do not have the word "find" in their body.

query=title:"Letter by Letter" body:find
http://api.nytimes.com/svc/search/v1/article?format=json&query=title%3A%22Letter+by+Letter%22+body%3Afind&api-key=#### 
{
  "offset": "0",
  "results": [
    {
      "body": "Great spellers come in all types, from egotistical showoffs to loners who find sanctuary in the forest of words. Kunal Sah, a 13-year-old eighth-grader, is an angry speller. He lives with his uncle and aunt at the Ramada Limited Motel in this tough former railroad town in eastern Utah. Kunal is making himself into a great speller by way of",
      "byline": "By KIRK JOHNSON",
      "date": "20070506",
      "title": "AMERICAN ALBUM; Torn From Parents, a Top Speller Vents His Anger, Letter by Letter",
      "url": "http:\/\/www.nytimes.com\/2007\/05\/06\/us\/06speller.html"
    },
    {
      "body": "It began in 1978, Bob J. Frye recalled, as a way to break the ice at the beginning of the semester for his English composition class at Texas Christian University, in Fort Worth. He would write a letter introducing himself to the class, then ask each student to write a letter to him, once a week. No grades on the letters; just an exercise. Twenty",
      "byline": "By David W. Chen",
      "date": "19980405",
      "title": "BLACKBOARD: CLASS CORRESPONDENCE; Studying English, Letter by Letter",
      "url": "http:\/\/www.nytimes.com\/1998\/04\/05\/education\/blackboard-class-correspondence-studying-english-letter-by-letter.html"
    }
  ],
  "tokens": [
    "title:\"Letter by Letter\"",
    "body:find"
  ],
  "total": 2
}
"A portion of the beginning of the article. Note: Only a portion of the article body is included in responses. 
But when you search against the" "field, you search the full text of the article." [1]

Changing the fields that are returned

By default, matching articles are described using five fields. If our application does not use the body field, we should ask not to get it as part of the results (to save a little bandwidth and memory). The fields parameter lets us list the fields that we do want, so we just omit body in the fields we ask for. Notice in this example that only four fields are used to describe the matching articles, not the default five.

query=title:"Letter by Letter"
fields=byline, date, title, url                (<-- These are four of the five fields that are returned by default.)
http://api.nytimes.com/svc/search/v1/article?format=json&query=title%3A%22Letter+by+Letter%22&fields=byline%2C+date%2C+title%2C+url&api-key=#### 
 {
  "offset": "0",
  "results": [
    {
      "byline": "By JANET MASLIN",
      "date": "20100325",
      "title": "BOOKS OF THE TIMES; Creepy-Crawly, Letter by Letter",
      "url": "http:\/\/www.nytimes.com\/2010\/03\/25\/books\/25book.html"
    },
   ...
    {
      "byline": "By David W. Chen",
      "date": "19980405",
      "title": "BLACKBOARD: CLASS CORRESPONDENCE; Studying English, Letter by Letter",
      "url": "http:\/\/www.nytimes.com\/1998\/04\/05\/education\/blackboard-class-correspondence-studying-english-letter-by-letter.html"
    }
  ],
  "tokens": [
    "title:\"Letter by Letter\""
  ],
  "total": 7
}

Adding a facet to the result for each matching article

We can add facet names to the value of the field parameter, too. If the matching article has values for the facet, they will be included as part of the result. In this example, the seventh result mentions the organization TEXAS CHRISTIAN UNIVERSITY. Facets are conceptually similar to fields, but distinctions arise and muddle as we go along. In this case, they are being treated the same in the fields parameter with a slight variation in the results structure (with the use of an array).

query=title:"Letter by Letter"
fields=byline, date, title, url, org_facet
http://api.nytimes.com/svc/search/v1/article?format=json&query=title%3A%22Letter+by+Letter%22&fields=byline%2C+date%2C+title%2C+url%2C+org_facet&api-key=#### 
{
  "offset": "0",
  "results": [
    {
      "byline": "By JANET MASLIN",
      "date": "20100325",
      "title": "BOOKS OF THE TIMES; Creepy-Crawly, Letter by Letter",
      "url": "http:\/\/www.nytimes.com\/2010\/03\/25\/books\/25book.html"
    },
    ...
    {
      "byline": "By David W. Chen",
      "date": "19980405",
      "org_facet": [
        "TEXAS CHRISTIAN UNIVERSITY"
      ],
      "title": "BLACKBOARD: CLASS CORRESPONDENCE; Studying English, Letter by Letter",
      "url": "http:\/\/www.nytimes.com\/1998\/04\/05\/education\/blackboard-class-correspondence-studying-english-letter-by-letter.html"
    }
  ],
  "tokens": [
    "title:\"Letter by Letter\""
  ],
  "total": 7
}

Adding another facet to the result for each matching article

Let's add the geographic location that an article mentions, as well as the organizations. Here, we're showing the second through fifth result articles because they have values for some of these two facets.

query=title:"Letter by Letter"
fields=byline, date, title, url, org_facet, geo_facet
http://api.nytimes.com/svc/search/v1/article?format=json&query=title%3A%22Letter+by+Letter%22+&fields=byline%2C+date%2C+title%2C+url%2C+org_facet%2C+geo_facet&api-key=#### 
{
  "offset": "0",
  "results": [
    ...
    {
      "byline": "By KIRK JOHNSON",
      "date": "20070506",
      "geo_facet": [
        "UTAH",
        "INDIA",
        "GREEN RIVER (UTAH)"
      ],
      "title": "AMERICAN ALBUM; Torn From Parents, a Top Speller Vents His Anger, Letter by Letter",
      "url": "http:\/\/www.nytimes.com\/2007\/05\/06\/us\/06speller.html"
    },
    {
      "byline": "By LILY KOPPEL",
      "date": "20070302",
      "geo_facet": [
        "NEW YORK CITY"
      ],
      "title": "Letter by Letter, Sacred Documents Are Reborn",
      "url": "http:\/\/www.nytimes.com\/2007\/03\/02\/nyregion\/02torah.html"
    },
    {
      "byline": "By MICHAEL BRICK",
      "date": "20040122",
      "geo_facet": [
        "NEW JERSEY",
        "NEW YORK CITY"
      ],
      "org_facet": [
        "NEW JERSEY NETS"
      ],
      "title": "Reinventing a Team, Letter by Letter",
      "url": "http:\/\/www.nytimes.com\/2004\/01\/22\/sports\/reinventing-a-team-letter-by-letter.html"
    },
    {
      "byline": "By DOUGLAS FRANTZ",
      "date": "20010902",
      "geo_facet": [
        "AZERBAIJAN"
      ],
      "title": "Breaking Old Soviet Ties, Letter by Letter",
      "url": "http:\/\/www.nytimes.com\/2001\/09\/02\/world\/breaking-old-soviet-ties-letter-by-letter.html"
    },
    ...
  ],
  "tokens": [
    "title:\"Letter by Letter\""
  ],
  "total": 7
}

Searching within facets, not fields

Although fields (e.g. body, byline, date, title, and url) and facets are conceptually the same, querying within each requires different syntax. As a loose approximation, fields of an article comprise the article (e.g. body, byline, date, title, and url), while facets are annotations of the article (e.g. day_of_week_facet, and page_facet). However, things get muddled quickly. For a given attribute that you care about, just find out if it is a field or a facet, then use the appropriate syntax. To be fair, there is a bit of symmetry between the query syntax and the result syntax with respect to how square brackets are used (or not used): title:"Letter by Letter" and "title": "Letter by Letter...", while geo_facet:[NEW YORK CITY] and "geo_facet": ["NEW YORK CITY"]. The distinction seems to be single-valued versus multi-valued. The "Data Fields" table at http://developer.nytimes.com/docs/article_search_api#h2-responses lists fields and facets. BE CAREFUL: the *_facet naming convention is not always followed (e.g. the date facet). Their "SFI" designations indicate that some {fields,facets} can be searched, but not returned -- and vice versa.

(suggest to replace Xs with S,F,I in Data Fields table)

(suggest to add vertical separators to the S,F,I columns in Data Fields table)

query=title:"Letter by Letter" geo_facet:[NEW YORK CITY]
fields=byline, date, title, url, org_facet, geo_facet
http://api.nytimes.com/svc/search/v1/article?format=json&query=title%3A%22Letter+by+Letter%22+geo_facet%3A%5BNEW+YORK+CITY%5D&fields=byline%2C+date%2C+title%2C+url%2C+org_facet%2C+geo_facet&api-key=#### 
{
  "offset": "0",
  "results": [
    {
      "byline": "By LILY KOPPEL",
      "date": "20070302",
      "geo_facet": [
        "NEW YORK CITY"
      ],
      "title": "Letter by Letter, Sacred Documents Are Reborn",
      "url": "http:\/\/www.nytimes.com\/2007\/03\/02\/nyregion\/02torah.html"
    },
    {
      "byline": "By MICHAEL BRICK",
      "date": "20040122",
      "geo_facet": [
        "NEW JERSEY",
        "NEW YORK CITY"
      ],
      "org_facet": [
        "NEW JERSEY NETS"
      ],
      "title": "Reinventing a Team, Letter by Letter",
      "url": "http:\/\/www.nytimes.com\/2004\/01\/22\/sports\/reinventing-a-team-letter-by-letter.html"
    }
  ],
  "tokens": [
    "title:\"Letter by Letter\"",
    "geo_facet:[NEW YORK CITY]"
  ],
  "total": 2
}

Creating a histogram of articles binned by their facets

The parameter named facet is NOTHING like the facets that we just listed within the fields parameter. The name of the facet parameter is a misnomer. Something like "histogram" or "aggregate" seems to more appropriately resemble what it does. We repeat the last query by removing the constraint geo_facet:[NEW YORK CITY] and asking for a histogram of articles as binned by the geo_facet facet. This results in an entire chunk of JSON before the typical "results" section that we are used to. This additional JSON provides a tally of the matching articles as grouped by the facets listed in the facets parameter. You can list up to five facets in the facets parameter, and you will get up to five histograms binning the same result articles by each facet.

(adding org_facet to facets parameter is not working)

query=title:"Letter by Letter"
fields=byline, date, title, url, org_facet, geo_facet
facets=geo_facet
http://api.nytimes.com/svc/search/v1/article?format=json&query=title%3A%22Letter+by+Letter%22&facets=geo_facet&fields=+byline%2C+date%2C+title%2C+url%2C+org_facet%2C+geo_facet&api-key=#### 
{
  "facets": {
    "geo_facet": [
      {
        "count": 2,
        "term": "NEW YORK CITY"
      },
      {
        "count": 1,
        "term": "AZERBAIJAN"
      },
      {
        "count": 1,
        "term": "GREEN RIVER (UTAH)"
      },
      {
        "count": 1,
        "term": "INDIA"
      },
      {
        "count": 1,
        "term": "NEW JERSEY"
      },
      {
        "count": 1,
        "term": "UTAH"
      }
    ]
  },
  "offset": "0",
  "results": [
    {
      "byline": "By JANET MASLIN",
      "date": "20100325",
      "title": "BOOKS OF THE TIMES; Creepy-Crawly, Letter by Letter",
      "url": "http:\/\/www.nytimes.com\/2010\/03\/25\/books\/25book.html"
    },
    {
      "byline": "By KIRK JOHNSON",
      "date": "20070506",
      "geo_facet": [
        "UTAH",
        "INDIA",
        "GREEN RIVER (UTAH)"
      ],
      "title": "AMERICAN ALBUM; Torn From Parents, a Top Speller Vents His Anger, Letter by Letter",
      "url": "http:\/\/www.nytimes.com\/2007\/05\/06\/us\/06speller.html"
    },
    {
      "byline": "By LILY KOPPEL",
      "date": "20070302",
      "geo_facet": [
        "NEW YORK CITY"
      ],
      "title": "Letter by Letter, Sacred Documents Are Reborn",
      "url": "http:\/\/www.nytimes.com\/2007\/03\/02\/nyregion\/02torah.html"
    },
    {
      "byline": "By MICHAEL BRICK",
      "date": "20040122",
      "geo_facet": [
        "NEW JERSEY",
        "NEW YORK CITY"
      ],
      "org_facet": [
        "NEW JERSEY NETS"
      ],
      "title": "Reinventing a Team, Letter by Letter",
      "url": "http:\/\/www.nytimes.com\/2004\/01\/22\/sports\/reinventing-a-team-letter-by-letter.html"
    },
    {
      "byline": "By DOUGLAS FRANTZ",
      "date": "20010902",
      "geo_facet": [
        "AZERBAIJAN"
      ],
      "title": "Breaking Old Soviet Ties, Letter by Letter",
      "url": "http:\/\/www.nytimes.com\/2001\/09\/02\/world\/breaking-old-soviet-ties-letter-by-letter.html"
    },
    {
      "byline": "By RICHARD EDER",
      "date": "20010221",
      "title": "BOOKS OF THE TIMES; Letter by Letter, the Alphabet Turns Into an Endgame",
      "url": "http:\/\/www.nytimes.com\/2001\/02\/21\/books\/books-of-the-times-letter-by-letter-the-alphabet-turns-into-an-endgame.html"
    },
    {
      "byline": "By David W. Chen",
      "date": "19980405",
      "org_facet": [
        "TEXAS CHRISTIAN UNIVERSITY"
      ],
      "title": "BLACKBOARD: CLASS CORRESPONDENCE; Studying English, Letter by Letter",
      "url": "http:\/\/www.nytimes.com\/1998\/04\/05\/education\/blackboard-class-correspondence-studying-english-letter-by-letter.html"
    }
  ],
  "tokens": [
    "title:\"Letter by Letter\""
  ],
  "total": 7
}

Creating ONLY a histogram of articles binned by their facets

If you only care about the histogram and not the actual articles, you can request that no fields and no facets be used to describe the matching articles. This results in an empty "results". To do this, define the fields parameter with no values (a single space).

query=title:"Letter by Letter"
fields=                                               (<-- there is a single space over there, use a '+' in the URL-encoded query)
facets=geo_facet
http://api.nytimes.com/svc/search/v1/article?format=json&query=title%3A%22Letter+by+Letter%22&facets=geo_facet&fields=+&api-key=#### 
{
  "facets": {
    "geo_facet": [
      {
        "count": 2,
        "term": "NEW YORK CITY"
      },
      {
        "count": 1,
        "term": "AZERBAIJAN"
      },
      {
        "count": 1,
        "term": "GREEN RIVER (UTAH)"
      },
      {
        "count": 1,
        "term": "INDIA"
      },
      {
        "count": 1,
        "term": "NEW JERSEY"
      },
      {
        "count": 1,
        "term": "UTAH"
      }
    ]
  },
  "offset": "0",
  "results": [
    
  ],
  "tokens": [
    "title:\"Letter by Letter\""
  ],
  "total": 7
}

Another histogram of articles binned by their facets

For each day of the week, how many times was the phrase "Letter by Letter" published?

query=title:"Letter by Letter"
facets=day_of_week_facet
http://api.nytimes.com/svc/search/v1/article?format=json&query=title%3A%22Letter+by+Letter%22&facets=day_of_week_facet&api-key=#### 
{
  "facets": {
    "day_of_week_facet": [
      {
        "count": 3,
        "term": "Sunday"
      },
      {
        "count": 2,
        "term": "Thursday"
      },
      {
        "count": 1,
        "term": "Friday"
      },
      {
        "count": 1,
        "term": "Wednesday"
      }
    ]
  },
  "offset": "0",
  "results": [
    {
      "body": "Hugh Raffles was taking a shower in his Manhattan apartment when a three-inch-long water bug dropped from the ceiling and landed at his feet. His first reaction was one that might be expected. “I admit it: I screamed,” he writes in “Insectopedia,” his new compendium of thoughts about the creepy-crawly. “Wouldn’t",
      "byline": "By JANET MASLIN",
      "date": "20100325",
      "title": "BOOKS OF THE TIMES; Creepy-Crawly, Letter by Letter",
      "url": "http:\/\/www.nytimes.com\/2010\/03\/25\/books\/25book.html"
    },
    ...
    {
      "body": "It began in 1978, Bob J. Frye recalled, as a way to break the ice at the beginning of the semester for his English composition class at Texas Christian University, in Fort Worth. He would write a letter introducing himself to the class, then ask each student to write a letter to him, once a week. No grades on the letters; just an exercise. Twenty",
      "byline": "By David W. Chen",
      "date": "19980405",
      "title": "BLACKBOARD: CLASS CORRESPONDENCE; Studying English, Letter by Letter",
      "url": "http:\/\/www.nytimes.com\/1998\/04\/05\/education\/blackboard-class-correspondence-studying-english-letter-by-letter.html"
    }
  ],
  "tokens": [
    "title:\"Letter by Letter\""
  ],
  "total": 7
}

(would really want to facet byline to see if the same author likes the phrase "Letter by Letter", but apparently cannot histogram using a field...)

(would be interesting to investigate the validity of West Wing's "Taking out the Trash" - the White House reports undesirable things late Friday because people don't pay as much attention to the news on the weekends.)

Getting DBpedia resources

We can get the DBPedia label and URL for things mentioned in articles.

query=title:"Letter by Letter"
fields=byline,title,url,date,dbpedia_resource_url
http://api.nytimes.com/svc/search/v1/article?format=json&query=title%3A%22Letter+by+Letter%22&fields=byline%2Ctitle%2Curl%2Cdate%2Cdbpedia_resource_url%2Cdbpedia_resource&api-key=####  
{
  "offset": "0",
  "results": [
    {
      "byline": "By JANET MASLIN",
      "date": "20100325",
      "title": "BOOKS OF THE TIMES; Creepy-Crawly, Letter by Letter",
      "url": "http:\/\/www.nytimes.com\/2010\/03\/25\/books\/25book.html"
    },
    {
      "byline": "By KIRK JOHNSON",
      "date": "20070506",
      "title": "AMERICAN ALBUM; Torn From Parents, a Top Speller Vents His Anger, Letter by Letter",
      "url": "http:\/\/www.nytimes.com\/2007\/05\/06\/us\/06speller.html"
    },
    {
      "byline": "By LILY KOPPEL",
      "date": "20070302",
      "title": "Letter by Letter, Sacred Documents Are Reborn",
      "url": "http:\/\/www.nytimes.com\/2007\/03\/02\/nyregion\/02torah.html"
    },
    {
      "byline": "By MICHAEL BRICK",
      "date": "20040122",
      "dbpedia_resource": [
        "Bruce Ratner"
      ],
      "dbpedia_resource_url": [
        "http:\/\/dbpedia.org\/resource\/Bruce_Ratner"
      ],
      "title": "Reinventing a Team, Letter by Letter",
      "url": "http:\/\/www.nytimes.com\/2004\/01\/22\/sports\/reinventing-a-team-letter-by-letter.html"
    },
    {
      "byline": "By DOUGLAS FRANTZ",
      "date": "20010902",
      "dbpedia_resource": [
        "Heydar Aliyev"
      ],
      "dbpedia_resource_url": [
        "http:\/\/dbpedia.org\/resource\/Heydar_Aliyev"
      ],
      "title": "Breaking Old Soviet Ties, Letter by Letter",
      "url": "http:\/\/www.nytimes.com\/2001\/09\/02\/world\/breaking-old-soviet-ties-letter-by-letter.html"
    },
    {
      "byline": "By RICHARD EDER",
      "date": "20010221",
      "dbpedia_resource": [
        "Czes\u00c5\u0082aw Mi\u00c5\u0082osz"
      ],
      "dbpedia_resource_url": [
        "http:\/\/dbpedia.org\/resource\/Czes%C3%85%C2%82aw_Mi%C3%85%C2%82osz"
      ],
      "title": "BOOKS OF THE TIMES; Letter by Letter, the Alphabet Turns Into an Endgame",
      "url": "http:\/\/www.nytimes.com\/2001\/02\/21\/books\/books-of-the-times-letter-by-letter-the-alphabet-turns-into-an-endgame.html"
    },
    {
      "byline": "By David W. Chen",
      "date": "19980405",
      "title": "BLACKBOARD: CLASS CORRESPONDENCE; Studying English, Letter by Letter",
      "url": "http:\/\/www.nytimes.com\/1998\/04\/05\/education\/blackboard-class-correspondence-studying-english-letter-by-letter.html"
    }
  ],
  "tokens": [
    "title:\"Letter by Letter\""
  ],
  "total": 7
}

Searching by known DBpedia resources

Associate DBpedia resources via co-occurrence in articles

data.nytimes.com's nyt:search_api_query

When you dereference a New York Times Linked Data URI, such as Namibia's http://data.nytimes.com/66220959843659172161, the nyt:search_api_query property provides a literal value that can be used to obtain articles regarding the subject. Before dereferencing, however, the linked data agent must append the literal with a api-key parameter and its Article Search API key.

http://api.nytimes.com/svc/search/v1/article?
query=nytd_geo_facet:[Namibia]
rank=newest
fields=author
       body
       byline
       classifiers_facet
       column_facet
       date
       day_of_week_facet
       des_facet
       desk_facet
       fee
       geo_facet
       lead_paragraph
       material_type_facet
       multimedia
       nytd_byline
       nytd_des_facet
       nytd_geo_facet
       nytd_lead_paragraph
       nytd_org_facet
       nytd_per_facet
       nytd_section_facet
       nytd_title
       nytd_works_mentioned_facet
       org_facet
       page_facet
       per_facet
       publication_day
       publication_month
       publication_year
       section_page_facet
       small_image_height
       small_image_url
       small_image_width
       source_facet
       title
       url
       word_count
       works_mentioned_facet
[2]

This does not include: abstract, comments, dbpedia_resource, dbpedia_resource_url, facet_terms, related_multimedia, small_image, text, tokens.

Facts about How to use New York Times Article Search APIRDF feed
Dcterms:created7 April 2010  +
Dcterms:creatorTim Lebo  +, and New York Times  +
Dcterms:descriptionstep by step tutorial for using the NYT API
Dcterms:modified2010-4-12
Foaf:homepagehttp://developer.nytimes.com/docs/article_search_api  +
Foaf:nameHow to use New York Times Article Search API
Skos:altLabelHow to use New York Times Article Search API  +, how to use new york times article search api  +, and HOW TO USE NEW YORK TIMES ARTICLE SEARCH API  +
Personal tools
internal pages