{"content":"\n

\n PPOC - JSON HTTP API\n

\n

\n Abstract\n

\n
\n
\n The Library of Congress' recently re-released Print & Photographs Online Catalog (http://www.loc.gov/pictures/) provides a json serialization of the request-scoped state used to create every html page.  This immediately enables PPOC to serve as a simple API for developers to make use of while building other applications, integrating Library data in new and innovative ways.
\n
\n
\n
\n

\n Disclaimer\n

\n
\n
\n This API is a work in progress. Use at your own risk!! We might (will likely) change this!\n
\n
\n

\n
\n
\n
    \n
  1. \n PPOC - JSON HTTP API\n
  2. \n
      \n
    1. \n Abstract\n
    2. \n
    3. \n Disclaimer\n
    4. \n
    5. \n General Usage\n
    6. \n
        \n
      1. \n HTML and JSON for every URL\n
      2. \n
      3. \n URL Parameters and HTTP Headers\n
      4. \n
      5. \n Motivation\n
      6. \n
      \n
    7. \n Home (/)\n
    8. \n
        \n
      1. \n Response\n
      2. \n
          \n
        1. \n \"featured\"\n
        2. \n
        3. \n \"collections\"\n
        4. \n
        5. \n \"indexes\"\n
        6. \n
        7. \n \"links\"\n
        8. \n
        \n
      \n
    9. \n Search\n
    10. \n
        \n
      1. \n Options\n
      2. \n
      3. \n Response\n
      4. \n
          \n
        1. \n \"search\"\n
        2. \n
        3. \n \"links\"\n
        4. \n
        5. \n \"views\"\n
        6. \n
        7. \n \"focus\"\n
        8. \n
        9. \n \"pages\"\n
        10. \n
        11. \n \"collection\"\n
        12. \n
        \n
      \n
    11. \n Related\n
    12. \n
        \n
      1. \n Options\n
      2. \n
      3. \n Response\n
      4. \n
          \n
        1. \n \"search\"\n
        2. \n
        3. \n \"links\"\n
        4. \n
        5. \n \"views\"\n
        6. \n
        7. \n \"results\"\n
        8. \n
        9. \n \"pages\"\n
        10. \n
        11. \n \"collection\"\n
        12. \n
        \n
      \n
    13. \n Item\n
    14. \n
        \n
      1. \n Options\n
      2. \n
      3. \n Response\n
      4. \n
          \n
        1. \n \"item\"\n
        2. \n
        3. \n \"links\"\n
        4. \n
        5. \n \"thesaurus_entry\"\n
        6. \n
        7. \n \"current_search\"\n
        8. \n
        9. \n \"related\"\n
        10. \n
        11. \n \"collection\"\n
        12. \n
        13. \n \"resources\"\n
        14. \n
        15. \n \"unrestricted\"\n
        16. \n
        \n
      \n
    15. \n Resource\n
    16. \n
        \n
      1. \n Options\n
      2. \n
      3. \n Response\n
      4. \n
          \n
        1. \n \"resource\"\n
        2. \n
        3. \n \"item\"\n
        4. \n
        5. \n \"links\"\n
        6. \n
        \n
      \n
    17. \n Collections\n
    18. \n
        \n
      1. \n Options\n
      2. \n
      3. \n Response\n
      4. \n
          \n
        1. \n \"collections\"\n
        2. \n
        3. \n \"links\"\n
        4. \n
        \n
      \n
    19. \n Collection\n
    20. \n
        \n
      1. \n Options\n
      2. \n
      3. \n Response\n
      4. \n
          \n
        1. \n \"collection\"\n
        2. \n
        3. \n \"links\"\n
        4. \n
        5. \n \"resources\"\n
        6. \n
        7. \n \"indexes\"\n
        8. \n
        9. \n \"current_resource\"\n
        10. \n
        \n
      \n
    21. \n Index\n
    22. \n
        \n
      1. \n Options\n
      2. \n
      3. \n Response\n
      4. \n
          \n
        1. \n \"current\"\n
        2. \n
        3. \n \"index_title\"\n
        4. \n
        5. \n \"terms\"\n
        6. \n
        7. \n \"pages\"\n
        8. \n
        9. \n \"resources\"\n
        10. \n
        11. \n \"collection\"\n
        12. \n
        13. \n \"indexes\"\n
        14. \n
        15. \n \"links\"\n
        16. \n
        \n
      \n
    \n
\n
\n
\n
\n

\n General Usage\n

\n

\n HTML and JSON for every URL\n

\nEvery URL exposes by http://www.loc.gov/pictures is available as html, json, and jsonp.
\n

\n URL Parameters and HTTP Headers\n

\nThe JSON serialization is requested by specifying the format in the request. This can be done in one of two ways:
\n1) URL query string parameter, \"fo\", e.g.,
\n    html: http://loc.gov/pictures/item/89709841/
\n    json: http://loc.gov/pictures/item/89709841/?fo=json
\n2) HTTP content negotiation via the HTTP_ACCEPT header, example with curl:
\n    html: curl curl -H \"Accept: text/html\" http://loc.gov/pictures/search?q=river
\n    json: curl -H \"Accept: application/json\" http://loc.gov/pictures/search?q=river
\n3) To enable jsonp, follow the conventions for json, but add the parameter callback=nameofyourcallback.
\n

\n Motivation\n

\nIn this example we use jQuery with the loc.gov/pictures api to create a mash up of random items from the featured collections.  (Of course cross domain ajax calls are not usually permitted so this examples assumes you are in the loc.gov domain already or you can use the dataType:'jsonp' )
\n
\n $.ajax({
\n     type: 'get',
\n     url: 'https://loc.gov/pictures/',
\n     dataType:'json',
\n     data:{
\n         fo:'json',
\n         at:'featured'
\n     },
\n     success: function(response){
\n         var featured = response.featured,
\n             random = [
\n                 Math.floor(Math.random()*featured.length),
\n                 Math.floor(Math.random()*featured.length),
\n                 Math.floor(Math.random()*featured.length)
\n             ];
\n         $(random).each(function(index, value){
\n             $.ajax({
\n                 type:'get',
\n                 url:'https://loc.gov/pictures/search',
\n                 dataType:'json',
\n                 data:{
\n                     fo:'json',
\n                     at:'results',
\n                     num:'3',
\n                     co: featured[value].code
\n                 },
\n                 success: function(response){
\n                     $('#mashup').append(template, response.results);
\n                 }
\n             });
\n         });
\n     }
\n })
\n
\n
\n
\n

\n Home (/)\n

\ndescribe base url options and response json
\n
\n&fo=json\">http://loc.gov/pictures/?fo=json Provides a list of featured collections, a list of all collections, and a list of global indexes.
\n

\n Response\n

\nThere are 12 featured collections and over 60 collections in all so the lists are shortened for brevity
\n

\n \"featured\"\n

\n
\n [{
\n     \"code\": \"hlb\",
\n     \"thumb\": \"https://www.loc.gov/pictures/static/data/hlb/thumb.png\",
\n     \"title\": \"Cartoon Drawings: Herblock Collection\",
\n     \"thumb_featured\": \"https://www.loc.gov/pictures/static/data/hlb/featured.png\",
\n     \"link\": \"https://www.loc.gov/pictures/collection/hlb/\",
\n     \"thumb_large\": \"https://www.loc.gov/pictures/static/data/hlb/thumb_large.png\"
\n }
,{
\n
  //similar to above...
\n ]

\n
\n

\n \"collections\"\n

\n
\n [{
\n
\n     //similar to above...
\n
\n },
{ //...there are more than 60 collections, shortened for brevity
\n
\n     //similar to above...
\n
\n }]

\n
\n

\n \"indexes\"\n

\nThis is a list of available indexes.  Globally there are always three, though a given collection may have more or fewer indexes. See indexes for a detailed example of the response object.
\n

\n \"links\"\n

\nProvides a set of links which provide additional serializations of the current url.  There are generally 2, json and html, but search and related provide additional links.
\n
\n {
\n     \"json\": \"https://loc.gov/pictures/?fo=json\",
\n     \"html\": \"https://loc.gov/pictures/\"
\n }
\n
\n
\n
\n

\n Search\n

\n&fo=json\">http://loc.gov/pictures/search/?q=<query>&fo=json
\n
\nSearches descriptive information for the search terms specified by <query>.
\n

\n Options\n

\nSearch Options
\n
\n
\n q - query, search terms (None)
\n
\n
\n fa - facets, format = <field>|<facet value> (None)
\n
\n
\n co - collection (None)
\n co! - _not_ collection (None)
\n op - operator (AND)
\n va - variants, (True)
\n fi - fields (None/\"text\")
\n
\n
\nResults Options
\n
\n
\n c - count (20)
\n st - style, (list)
\n sp - start page, (1)
\n si - start index (1)
\n fo - format
\n sb - sort by (relevance)
\n
\n
\n

\n Response\n

\n

\n \"search\"\n

\n
\n {
\n
\n
\n \"type\": \"search\",
\n
\n
\n \"query\": \"sioux indians\",
\n \"field\": null,
\n \"sort_by\": null,
 
\n
\n
\n
\n \"hits\": \"9\"
\n
\n }
\n
\n

\n \"links\"\n

\n
\n {
\n     \"json\": \"https://loc.gov/pictures/search?q=sioux%20indians&fo=json\",
\n     \"html\": \"https://loc.gov/pictures/search?q=sioux%20indians\"
\n     \"rss\": \"https://loc.gov/pictures/search?q=sioux%20indians&fo=rss\"
\n }
\n
\n

\n \"views\"\n

\n
\n {
\n
\n
\n \"current\": \"list\",
\n \"grid\": \"https://loc.gov/pictures/search/?q=sioux+indians&st=grid\",
\n \"list\": \"https://loc.gov/pictures/search/?q=sioux+indians\",
\n \"gallery\": \"https://loc.gov/pictures/search/?q=sioux+indians&st=gallery\",
\n \"slideshow\": \"https://loc.gov/pictures/search/?q=sioux+indians&st=slideshow\"
\n
\n }
\n
\n
\n
\n

\n \"focus\" \n

\n
\n {
\n     \"index\": 2,
\n }
\n
\n\"results\"\n
\n [{
\n
\n
\n \"index\": 1,
\n \"medium\": \"5 photoprints (postcards) : gelatin silver ; 14 x 19 cm. or smaller.\",
\n \"reproduction_number\": \"\",
\n \"title\": \"Studio portraits of Comanche and Sioux Indians in native dress\",
\n \"creator\": \"Bates Studio (Lawton, Okla.)\",
\n \"call_number\": \"LOT 12743 (F) [P&P]\",

\n \"medium_brief\": \"5 photoprints (postcards) :\",
\n \"pk\": \"89705331\",
\n \"created_published_date\": \"c1910-c1911.\",
\n \"links\": {
\n     \"item\": \"https://loc.gov/pictures/item/89705331/\",
\n     \"resource\": \"https://loc.gov/pictures/item/89705331/resource/\",
\n
},
\n \"image\":
{
\n     \"full\": \"https://loc.gov/pictures/static/images/item/500x500_grouprecord.png\",
\n     \"thumb\": \"http://loc.gov/pictures/static/images/item/grouprecord_thumb_large.jpg\",
\n     \"square\": \"http://loc.gov/pictures/static/images/item/grouprecord_square.png\",
\n     \"alt\": \"group item thumbnail\",
\n
},
\n
\"subjects\": [
\n
\n
\n
\n \"Indians of North America--Clothing & dress--1910-1920.\",
\n \"Infants--1910-1920.\",
\n \"Comanche Indians--1910-1920.\",
\n \"Dakota Indians--1910-1920.\"
\n
\n ]
\n
\n },{
\n
\n
\n \"index\": 2,
\n \"medium\": \"1 photographic print.\",
\n \"reproduction_number\": \"LC-USZ62-105379 (b&w film copy neg.)\",
\n \"title\": \"[In the land of the Sioux]\",

\n
\n
\n \"creator\": \"Curtis, Edward S., 1868-1952\",
\n \"call_number\": \"LOT 12319 <item> [P&P] [P&P]\",
\n \"medium_brief\": \"1 photographic print.\",
\n \"pk\": \"92511248\",
\n \"created_published_date\": \"c1905.\",
\n \"links\": {
\n     \"item\": \"http://loc.gov/pictures/item/92511248/\",
\n     \"resource\": \"https://loc.gov/pictures/item/92511248/resource/\",
\n
},
\n \"image\":
{
\n     \"full\": \"http://loc.gov/pictures/lcweb2/service/pnp/cph/3c00000/3c05000/3c05300/3c05379r.jpg\",
\n     \"thumb\": \"http://www.loc.gov/pictures/static/data/media/925/925112/92511248/92511248/gallery.jpg\",
\n     \"square\": \"http://www.loc.gov/pictures/static/data/media/925/925112/92511248/92511248/square.jpg\",
\n     \"alt\": \"digitized item thumbnail\",
\n
},

\n \"subjects\": [
\n
\n \"Indians of North America--Great Plains--1900-1910.\",
\n \"Dakota Indians--1900-1910.\",
\n \"Horseback riding--Great Plains--1900-1910.\"
\n
\n ]
\n
\n }]
\n
\n

\n \"pages\"\n

\n
\n {
\n     \"perpage\": 2,

\n     \"last\": \"https://loc.gov/pictures/search/?q=sioux&sp=3\",

\n     \"results\": \"1 - 2\",

\n     \"next\": \"https://loc.gov/pictures/search/?q=sioux&sp=2\",

\n     \"current\": 1,

\n     \"page_list\": [
{
\n         \"url\": null,

\n         \"number\": 1

\n     },{

\n         \"url\": \"https://loc.gov/pictures/search/?q=sioux&sp=2\",

\n         \"number\": 2

\n     },
{
\n         \"url\": \"https://loc.gov/pictures/search/?q=sioux&sp=3\",

\n         \"number\": 3

\n     }
],
\n     \"previous\": null,

\n     \"total\": 3,

\n     \"first\": null
\n
}
\n
\n

\n \"collection\"\n

\nProvides collection metadata when the collection/<code> or ?co=<code> was provided. The index_terms are restricted to terms from this collections indexes. See collection for the response objects details.
\n
\n
\n

\n Related\n

\nhttp://loc.gov/pictures/related?fi=<field>&q=<term>&fo=json
\n
\nRelated is very similar to search. While search utilizes full text indexing, and provides some field-specific searching, related finds items that have exact matches for the provided term in the field specified by <field>. Related makes use of the relations in the PPOC domain model and is useful for finding close fits in fields with controlled values.
\n
\nAnother feature that is supported through Related, is \"browse neighboring call numbers\". In this case a list of items near
\n

\n Options\n

\nSearch Options
\n
\n
\n q - query, related term (None)
\n
\n
\n co - collection (None)
\n co! - _not_ collection (None)
\n fi - must be one of: [subject|name|format](fi or pk required)
\n pk - primary key of item to use as basis for call number browse. Must be the primary key (control number) of a valid, existing item. (fi or pk required)
\n
\n
\nResults Options
\n
\n
\n c - count (20)
\n st - style, (list)
\n sp - start page, (1)
\n si - start index (1)
\n fo - format
\n
\n
\n

\n Response\n

\n

\n \"search\"\n

\n    See Search \"search\".
\n   
\n

\n \"links\"\n

\n    See Search \"links\".
\n

\n \"views\"\n

\n    See Search \"views\".
\n

\n \"results\"\n

\n    See Search \"results\".\n

\n \"pages\"\n

\n    See Search \"pages\"/
\n

\n \"collection\"\n

\n    Like Search \"collection\", provides collection metadata when the collection/<code> or ?co=<code> was provided. The index_terms are restricted to terms from this collections indexes. See collection for the response objects details.
\n
\n
\n

\n Item\n

\ndescribe item options and response json
\n
\n

\n Options\n

\ncollection/<code> or ?co=<code>
\n

\n Response\n

\nresponse properties here
\n
\n

\n \"item\"\n

\n
\n {
\n
\n \"title\": \"[Portrait of Henri Matisse]\",

\n \"control_number\": \"2004663297\",
\n \"date\": \"1933 May 20.\",
\n \"summary\": \"\",
\n \"medium_brief\": \"1 photographic print :\",

\n \"link\": \"https://loc.gov/pictures/item/2004663297\",

\n \"marc\": \"https://loc.gov/pictures/item/2004663297/marc\",
\n \"call_number\": \"LOT 12735, no. 781 [P&P]\",

\n \"display_offsite\": true,
\n \"created_published\": \"1933 May 20.\",

\n
\"restriction\": \"\",
\n \"reproduction_number\": \"LC-USZ62-103699 (b&w film copy neg.)\",

\n \"part_of\": \"Van Vechten, Carl, 1880-1964. Portrait photographs of celebrities\",

\n \"thumb_gallery\": \"https://loc.gov/pictures/static/data/media/200/200466/200466329/2004663297/gallery.jpg\",
\n \"other_number\": \"\",
\n \"title_translation\": \"\",
\n \"id\": \"2004663297\",
\n \"contents\": \"\",
\n \"sort_date\": \"1500-01-01\",
\n \"stmt_of_responsibility\": \"\",
\n \"other_titles\": \"\",
\n \"repository\": \"Library of Congress Prints and Photographs Division Washington, D.C. 20540 USA\",

\n \"rights_information\": \"For publication information see \\\"Carl Van Vechten Photographs (Lots 12735 and 12736)\\\" http://www.loc.gov/rr/print/res/079_vanv.html\",

\n \"terms\": [],
\n \"related_names\": [],
\n \"related_items\": [],
\n \"resource_links\": [
\n     \"https://hdl.loc.gov/loc.pnp/van.5a52380\",
\n     \"https://hdl.loc.gov/loc.pnp/cph.3c03699\"
\n ],

\n
\"formats\": [{
\n     \"link\": \"https://loc.gov/pictures/related?fi=format&q=Portrait photographs.\",
\n     \"title\": \"Portrait photographs.\"
\n }],
\n \"mediums\": [{
\n     \"medium\": \"1 photographic print : gelatin silver.\",
\n     \"label\": null
\n }]
,
\n \"creators\": [{
\n     \"role\": \"photographer\",
\n     \"title\": \"Van Vechten, Carl, 1880-1964\"
,
\n     \"link\": \"https://loc.gov/pictures/related?fi=name&q=Van Vechten, Carl, 1880-1964\"
\n }],
\n \"subjects\": [{
\n     \"title\": \"Matisse, Henri,--1869-1954.\",
\n     \"link\": \"https://loc.gov/pictures/related?fi=subject&q=Matisse, Henri,--1869-1954.\"
\n
\n }],
\n \"collections\": [{
\n     \"code\": \"van\",
\n     \"title\": \"Van Vechten Collection\"
,
\n     \"link\": \"https://loc.gov/pictures/collection/van\"
\n }],

\n \"notes\": [{
\n     \"note\": \"Title derived from information on verso of photographic print.\",
\n     \"label\": null
\n },{
\n     \"note\": \"Van Vechten number: XXIII C 7.\",
\n     \"label\": null
\n },{
\n     \"note\": \"Also available on microfilm.\",
\n     \"label\": null
\n },{
\n     \"note\": \"Gift; Carl Van Vechten Estate; 1966.\",
\n     \"label\": null
\n },{
\n     \"note\": \"Forms part of: Portrait photographs of celebrities, a LOT which in turn forms part of the Carl Van Vechten photograph collection (Library of Congress).\",
\n     \"label\": null
\n }]
\n
\n }

\n
\n

\n \"links\"\n

\nProvides a set of links which provide additional serializations of the current url.  There are generally 2, json and html, but search and related provide additional links. See links for more details and an example.
\n

\n \"thesaurus_entry\"\n

\nThis will be null unless this item is from the Thesaurus of Graphical Material
\n
\n
\n {
\n     \"count\": 0,
\n     \"term\": \"Ablution fountains\",
\n     \"used_for\": [{
\n         \"count\": 3,
\n         \"type\": \"Related Term\",
\n         \"related\": \"Bathing\"
\n     },{
\n         \"count\": 10,
\n         \"type\": \"Related Term\",
\n         \"related\": \"Fountains\"
\n     },{
\n         \"count\": 23,
\n         \"type\": \"Related Term\",
\n         \"related\": \"Rites & ceremonies\"
\n     },{
\n         \"count\": 0,
\n         \"type\": \"Used For\",
\n         \"related\": \"Fountains, Ablution\"
\n     }],
\n     \"preferred_terms\": [],
\n     \"related_terms\": [],
\n     \"narrower_terms\": [],
\n     \"broader_terms\": [{
\n         \"count\": 5,
\n         \"type\": \"Broader Term\",
\n         \"related\": \"Religious architectural elements\"
\n     }],

\n     \"facet_notes\": [
\n         \"--[country or state]--[city]\"
\n     ],
\n     \"scope_notes\": [],

\n     \"hisory_notes\": []
\n }
\n
\n

\n \"current_search\"\n

\n
\n {
\n
\n     \"current\": 2,    
\n     \"total\": 17,

\n     \"search_link\": \"https://loc.gov/pictures/search/?q=henri\",
\n     \"next\": \"https://loc.gov/pictures/item/2002707053/\",
\n     \"previous\": \"https://loc.gov/pictures/item/2002724877/\",

\n     \"next_img\": \"https://www.loc.gov/pictures/static/data/media/200/200270/200270705/2002707053/thumb.jpg\",
\n     \"previous_img\": \"https://www.loc.gov/pictures/static/data/media/200/200272/200272487/2002724877/thumb.jpg\",

\n
\n }

\n
\n
\n

\n \"related\"\n

\n
\n {
\n     \"lot_link\": null,
\n     \"neighbors\": \"https://loc.gov/pictures/related?&pk=2002706200&st=gallery&sb=call_number#focus\",
\n     \"group_record\": null
\n }
\n
\n

\n \"collection\"\n

\nProvides collection metadata when the collection/<code> or ?co=<code> was provided. The index_terms are restricted to terms from this collections indexes. See collection for the response objects details.
\n

\n \"resources\"\n

\nMay be an empty array if the item is not digitized, or if the item is from a collection like look, group, etc.  There can be 0 or more resources.
\n
\n
\n [{
\n     //see resource for field details and example
\n },{
\n     //see resource for field details and example
\n }]
\n
\n

\n \"unrestricted\"\n

\ntrue if the resources are all provided, false if some resources have been hidden (for example exclusion of links to high resolution tiffs)
\n
\n
\n
\n

\n Resource\n

\nhttp://loc.gov/pictures/resource/ppmsc.03034?fo=json
\n
\nA Resource is used to describe a digitization of an item.  A photo or image may have been scanned several different ways, and those scans are in turn used to generate derivatives like thumbnails for view on the web.
\n

\n Options\n

\nresource/<resource_id> *required
\n?co=<code>
\n
\nHere are some example urls for clarity:
\n\n

\n Response\n

\nProvides a detailed description of this specific digital resource
\n

\n \"resource\"\n

\n
\n {
\n
\n     \"id\": \"ppmsc.03034\",
\n     \"aggregate\": \"ppmsc\",
\n     \"external\": null,

\n     \"url\": \"https://hdl.loc.gov/loc.pnp/ppmsc.03034\",
\n     \"link\": \"https://loc.gov/pictures/resource/ppmsc.03034\"
,
\n
    \"note\": \"original\",
\n     \"item\": \"03034\",
\n     \"small_s\": 17029,
\n     \"medium_s\": 69892,
\n     \"large_s\": 139894,
\n     \"larger_s\": 34239356,
\n     \"largest_s\": 0,
\n
    \"small\": \"https://lcweb2.loc.gov/service/pnp/ppmsc/03000/03034t.gif\",

\n     \"medium\": \"https://lcweb2.loc.gov/service/pnp/ppmsc/03000/03034r.jpg\",
\n     \"large\": \"https://lcweb2.loc.gov/service/pnp/ppmsc/03000/03034v.jpg\",
\n     \"larger\": \"https://lcweb2.loc.gov/master/pnp/ppmsc/03000/03034u.tif\",

\n     \"largest\": \"https://memory.loc.gov/pp/notdig.gif\"
\n    
\n }
\n
\n

\n \"item\"\n

\nProvides a detailed bibliographic description of the item. See item for more details and an example.
\n
\n

\n \"links\"\n

\nProvides a set of links which provide additional serializations of the current url.  There are generally 2, json and html, but search and related provide additional links. See links for more details and an example.
\n
\n
\n

\n Collections\n

\nhttp://loc.gov/pictures/collections?fo=json
\n
\nProvides a list of all available collections along with a brief summary and a number of additional details.
\n

\n Options\n

\nNo options
\n

\n Response\n

\nNote there are over 60 collections, so the array below is truncated for brevity.
\n

\n \"collections\"\n

\n
\n [{
\n
\n     //see collection for field details and examples
\n
\n },
{ //...there are over 60 collections, shortened for brevity
\n
\n     //see collection for field details and examples
\n
\n }]

\n
\n

\n \"links\"\n

\nProvides a set of links which provide additional serializations of the current url.  There are generally 2, json and html, but search and related provide additional links. See links for more details and an example.
\n
\n

\n

\n Collection\n

\nhttp://loc.gov/pictures/collection/<code>?fo=json
\n
\nProvides a summary of information about the collection (specified by the <code>) as well as links to additional resources such as html essays, indexes, and standard search entry points.
\n
\n

\n Options\n

\ncollection/<code> or ?co=<code>
\n

\n Response\n

\nAll links provided by the resources link property provide the same resources, collection, and indexes properties, but the essay property will contain the html content for the specified collection resource.
\n

\n \"collection\"\n

\n
\n {
\n     \"code\": \"ecur\",
\n     \"digitized\": \"All\",
\n     \"display_offsite\": \"Yes\",
\n     \"title\": \"Curtis (Edward S.) Collection\",
\n     \"link\": \"https://loc.gov/pictures/collection/ecur\",
\n     \"banner_item\": \"https://loc.gov/pictures/item/94504691\",
\n     \"banner_title\": \"Shows As He Goes. Edward S. Curtis, 1905.\",
\n     \"banner\": \"https://loc.gov/pictures/static/data/ecur/banner.jpg\",
\n     \"from_date\": \"1890\",
\n     \"to_date\": \"1929\",
\n     \"view_all\": \"https://loc.gov/pictures/search?st=grid&c=100&co=ecur\",
\n     \"extent\": \"about 1,000 photographic prints (selection from full collection)\",
\n     \"rights\": \"https://www.loc.gov/rr/print/res/369_curt.html\",
\n     \"thumb\": \"https://loc.gov/pictures/static/data/ecur/thumb.png\",
\n     \"thumb_item\": \"\",
\n     \"thumb_large_item\": \"\",
\n     \"thumb_large\": \"https://loc.gov/pictures/static/data/ecur/thumb_large.png\",
\n     \"brief\": \"Native Americans in the Pacific Northwest, New Southwest, Great Basin, Great Plains, Plateau Region, California, and Alaska. Features studio and field photographs. Selected images are primarily those for which copy photos have been produced.\"
\n }
\n
\n

\n \"links\"\n

\nProvides a set of links which provide additional serializations of the current url.  There are generally 2, json and html, but search and related provide additional links. See links for more details and an example.
\n

\n \"resources\"\n

\nProvides a list of essays and supplemental resources about this collection.
\n
\n [{
\n
\n   \"title\": \"About this Collection\",
\n   \"link\": \"https://loc.gov/pictures/collection/ecur/about.html\",
\n
  \"content\": \"https://loc.gov/pictures/static/data/ecur/resources/about.html\"
\n
\n },{//there are many more, shortened here for brevity
\n
\n   \"title\": \"Tribe Index\",
\n   \"link\": \"https://loc.gov/pictures/collection/ecur/tribeindex.html\",
\n
  \"content\": \"https://loc.gov/pictures/static/data/ecur/resources/tribeindex.html\"
\n    
\n }]
\n
\n

\n \"indexes\"\n

\nThis is a list of available indexes.  Globally there are always three, though a given collection may have more or fewer indexes. See indexes for a detailed example of the response object.
\n

\n \"current_resource\"\n

\nThe html content of the resource.
\n
\n {
\n     \"link\": \"https://loc.gov/pictures/collection/ecur/about.html\",
\n     \"content\": \"\\n <h2>About this Collection</h2>\\n\\n <p>The Edward S. Curtis Collection offers a unique glimpse\\n into Curtis's work with indigenous cultures. The more than\\n 2,400 silver-gelatin photographic prints were acquired by\\n the Library of Congress through copyright deposit from\\n about 1900 through 1930. About two-thirds (1,608) of these\\n images were not published in Curtis's multi-volume work,\\n <cite>The North American Indian</cite>. The collection includes\\n a large number of individual or group portraits, as well as\\n traditional and ceremonial dress, dwellings and other\\n structures, agriculture, arts and crafts, rites and\\n ceremonies, dances, games, food preparation,\\n transportation, and scenery. The portion of the collection\\n that is cataloged online represents those photographs for\\n which copy negatives or transparencies exist.</p>\\n \"
\n    
\n }

\n
\n
\n
\n
\n

\n Index\n

\nIndexes may be accessed http://loc.gov/pictures/index/subjects/<start>?fo=json, where <start> is an optional letter or the beginning of a word.  For example http://loc.gov/pictures/index/subjects/b?fo=json will give me all subjects starting with 'b', while http://loc.gov/pictures/index/subjects/baby?fo=json will return only the index entries which begin with 'baby'.
\n
\n\n

\n Options\n

\nindex/<type> - specifies the type of index.  standard options are:
\n\n
\ncollection/<code> or ?co=<code> - limits index selection to specific collection
\n
\n/<search_term> or ?q=<search_term> - limits the index to entries beginning with the search_term
\n
\n

\n Response\n

\nThe response properties below are taken from:
\nhttp://loc.gov/pictures/collection/lomax/index/subjects/african?fo=json
\nor its equivalent form:
\nhttp://www.loc.gov/pictures/collection/lomax/index/subjects/?q=african&fo=json
\n

\n \"current\"\n

\nThe current term being used to filter the index when provided.  Defaults to 'a'
\n
\n \"african\"
\n
\n

\n \"index_title\"\n

\nThe title of the index currently being browsed.
\n
\n \"subjects\"
\n
\n
\n

\n \"terms\"\n

\n
\n [{
\n     \"count\": 1,
\n     \"field\": \"subjects\",
\n     \"value\": \"African Americans--1930-1940.\",
\n     \"url\": \"https://loc.gov/pictures/related?q=African%20Americans--1930-1940.&fi=subjects&co=lomax\"
\n },
\n //..there are many more, shortened for brevity
\n {
\n     \"count\": 1,
\n     \"field\": \"subjects\",
\n     \"value\": \"African Americans--Women--1940.\"
,
\n     \"url\": \"https://loc.gov/pictures/related?q=African%20Americans--Women--1940.&fi=subjects&co=lomax\"
\n }
]

\n
\n

\n \"pages\"\n

\nProvides a list of letters for which an index exists
\n
\n [\"a\", \"b\", \"c\", \"f\", \"h\", \"i\", \"l\", \"m\", \"o\", \"r\", \"s\", \"v\", \"w\"]
\n
\n

\n \"resources\"\n

\nProvides links to additional resources, like essays for a specific collection.  This is only available when the collection/<code> or ?co=<code> was provided. See resources for the response objects details.
\n

\n \"collection\"\n

\nProvides collection metadata when the collection/<code> or ?co=<code> was provided. The index_terms are restricted to terms from this collections indexes. See collection for the response objects details.
\n

\n \"indexes\"\n

\nThis is a list of available indexes.  Globally there are always three, though a given collection may have more or fewer indexes.
\n
\n [{
\n   \"count\": 1,
\n   \"link\": \"https://loc.gov/pictures/collection/brum/index/formats/\",
\n   \"title\": \"formats\"
\n },{
\n   \"count\": 1,
\n   \"link\": \"https://loc.gov/pictures/collection/brum/index/names/\",
\n   \"title\": \"names\"
\n },{
\n   \"count\": 53,
\n   \"link\": \"https://loc.gov/pictures/collection/brum/index/subjects/\",
\n   \"title\": \"subjects\"
\n }]
\n
\n

\n \"links\"\n

\nProvides a set of links which provide additional serializations of the current url.  There are generally 2, json and html, but search and related provide additional links. See links for more details and an example.
\n

\n
", "links":{ "json": "https://www.loc.gov/pictures/api?fo=json", "html": "https://www.loc.gov/pictures/api" }, "indexes":[ { "link": "https://www.loc.gov/pictures/index/names/", "title": "names" }, { "link": "https://www.loc.gov/pictures/index/subjects/", "title": "subjects" }, { "link": "https://www.loc.gov/pictures/index/formats/", "title": "formats" } ]}