Response Document

Version 0.3

This API is still under development and is subject to further change.

JSON Response Summary

Elements starting with $ (e.g. $field) are variable names.

                {
                   "request" : Str,
                   "version" : Str,
                
                 // Navigation information about the result set:
                   "result"  : {
                       "page"          : Int,
                       "pages"         : Int,
                       "prev_page"     : Str,
                       "next_page"     : Str,
                       "hits"          : Int,
                       "hits_per_page" : Int,
                       "hits_from"     : Int,
                       "hits_to"       : Int,
                       "query_time"    : Int,
                   },
                
                // About the range of publication dates in the set:
                   "pubdate" : {
                       "min"           : Str,
                       "max"           : Str,
                       "min_year"      : Int,
                       "max_year"      : Int,
                   },
                
                // Facetable fields:
                   "facet"   : {
                       "lang"         : [ name, value, ... ],
                       "media"        : [ name, value, ... ],
                       "contributor"  : [ name, value, ... ],
                   },
                
                // List of matching documents (current page):
                   "docs"   : [
                       {
                           "key"      : Str,
                           "pkey"     : Str,
                           "label"    : Str,
                           "type"     : Str,
                           "location" : Str,
                           "title"    : [ Str, ... ],
                           "creator"  : [ Str, ... ],
                           "Subject"  : [ Str, ... ],
                           "Note"     : [ Str, ... ],
                
                       }, ...
                   ],
                }
                

Result Set Information

The first part of the response contains information about the search result set. These values are primarily useful for navigating through the result set.

request
The request URI
version
Version string of the API
page
Number of the current page of results
pages
Number of pages in the result set
prev_page
URI to get the previous page of results
next_page
URI to get the next page of results
hits
Total number of documents matching the search criteria
hits_per_page
Number of matches per page of results
hits_from
Number of the first result on the current result page
hits_to
Number of the last result on the current result page
query_time
Time in milliseconds spend executing the main search query
min
Earliest date of publication of any record in the result set
max
Latest date of publication of any record in the result set
min_year
Earliest year of publication of any record in the result set. (Same as the first four characters of min.)
max_year
Latest year of publication of any record in the result set. (Same as the first four characters of max.)

Facet fields

The facet section of the response provides facet counts for selected fields: document language, media type and contributor identifier. each facet field provides an array of value and count pairs, indicating the number of documents containing each value. In the following example, there are 18 documents in Englihsh, 12 in French and 7 in Chinese within the result set:

Documents

The docs section of the response includes an array of documents for the current results page (corresponding to the position in the result set described by the page, hits_from and hits_to variables). Within each document is a table of field-value pairs. Fields which can only contain a single value (e.g., key, location have string values, while fields that could contain more than one value (e.g., title, creator) have array values, even if there is only a single value for that particular record.

                "lang" : [ "eng", 18, "fra", 12, "zho", 7 ]