Keyword Lookup API

Keyword Lookup API: http://core.tdar.org/api/lookup/keyword

tDAR maintains authorities for all of its keywords. Users can lookup information on those keywords using a JSON based API.  Keyword types include:

  • Geographic Keywords
  • Site Number / Name Keywords
  • Site Type Keywords
  • Temporal Keywords
  • General Keywords
  • Culture Keywords
  • Material Keywords
  • Investigation Types

Requests:

To make a request to the tDAR keyword API, you will need a keyword type, and a term.

Parameters:

  • keywordType: one of the following (CultureKeyword|OtherKeyword|SiteNameKeyword|SiteTypeKeyword|MaterialKeyword|InvestigationType|GeographicKeyword|TemporalKeyword)
  • term: the term to search for.
  • startRecord: the first record to display (for pagination)
  • recordsPerPage: the number of records to return
  • sortField: how to sort the results, default is relevance.

Response:

The response will include the following information:

  1. A list of "items" that contains the label, id, and a full URL for the keyword.
  2. A status object containing the number of results, records per page, and sorting options.

Example:

A site-name keyword search for the word "head."

URL: http://core.tdar.org/api/lookup/keyword?keywordType=SiteNameKeyword&term=head 

{
    "items": [
        {
            "detailUrl": "/browse/site-name/14001/head-smashed-in-buffalo-jump",
            "id": 14001,
            "label": "Head-Smashed-In Buffalo Jump"
        }
    ],
    "status": {
        "recordsPerPage": 25,
        "sortField": "RELEVANCE",
        "startRecord": 0,
        "totalRecords": 1
    }
}