The New York Times

Semantic API

The Semantic API complements the Articles API. With the Semantic API, you get access to the long list of people, places, organizations and other locations,…

Media & content#openapi

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

The Semantic API complements the Articles API. With the Semantic API, you get access to the long list of people, places, organizations and other locations, entities and descriptors that make up the controlled vocabulary used as metadata by The New York Times (sometimes referred to as Times Tags and used for Times Topics pages).

The Semantic API uses concepts which are, by definition, terms in The New York Times controlled vocabulary. Like the way facets are used in the Articles API, concepts are a good way to uncover articles of interest in The New York Times archive, and at the same time, limit the scope and number of those articles. The Semantic API maps to external semantic data resources, in a fashion consistent with the idea of linked data. The Semantic API also provides combination and relationship information to other, similar concepts in The New York Times controlled vocabulary.

Endpoints 2

  • GETGET /name/{concept-type}/{specific-concept}.json/name/:concept-type/:specific-concept.json?fields=all&query=string
  • GETGET /search.json/search.json?query=string&offset=10&fields=all

API details

Base URL
https://api.nytimes.com/svc/semantic/v2/concept
Authentication
An API key in the api-key query parameter
Operations
2 operations on 2 pathsGET 2
Response formats
application/json
Description format
Swagger 2.0, API version 2.0.0

How to test the Semantic API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Semantic API collection, without the publisher's secrets.
  3. Add your credentialsThis API uses an API key in the api-key query parameter. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “GET /name/{concept-type}/{specific-concept}.json” (GET /name/:concept-type/:specific-concept.json?fields=all&query=string), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Semantic API?

The Semantic API complements the Articles API. With the Semantic API, you get access to the long list of people, places, organizations and other locations,… It is listed under Media & content and has 2 endpoints.

Who publishes the Semantic API?

It is listed from The New York Times's public API description (an OpenAPI document), not published by The New York Times on Swastik Codes. Anyone who controls nytimes.com can claim the profile by adding a DNS TXT record.

What is the base URL of the Semantic API?

Requests go to https://api.nytimes.com/svc/semantic/v2/concept. Endpoint paths are added to this base URL.

How do I authenticate with the Semantic API?

With an API key in the api-key query parameter.

How many endpoints does the Semantic API have?

2 operations on 2 paths (2 GET).

Is forking the Semantic API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.