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:
- A list of "items" that contains the label, id, and a full URL for the keyword.
- 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Â
SiteNameKeyword search for "head" 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 } }