You can look up an LCSH term for it's URI using:[known lcsh term]

You are right that not all precoordinated strings are in LCSH, but you can try each one separately:

Don't forget url encoding. With content negotiation you can get other formats than the html (see the bottom of the page), or if you just want the uri, ask for headers only.


Nate Trail
Library of Congress
[log in to unmask]

-----Original Message-----
From: Code for Libraries [mailto:[log in to unmask]] On Behalf Of Dan
Sent: Monday, November 11, 2013 2:34 AM
To: [log in to unmask]
Subject: [CODE4LIB] mapping LCSH from book records to shNNNN codes?

Hi, I'm interested in mapping the LCSH topics described in Library of Congress book records to the "predefined headings" LCSH thesaurus defined at

For example, the MODS version of the LoC record for isbn 1606238760 contains this LCSH info:

  <subject authority="lcsh">
    <topic>Social sciences</topic>
    <topic>Statistical methods</topic>
    <topic>Data processing</topic>

... which maps neatly to "sh2010113695" (Social sciences--Statistical methods--Data processing) (see

However, not all topics map to a single shNNNN code (multiple shNNNN's with the same description), and some topics have no shNNNN code at (e.g. "Discourse analysis--Research", even though "Discourse analysis" exists)

Is there a way to retrieve the shNNNN codes directly for a book record? I'm currently using the LoC SRU (search/retrieval via URL) service, but it only serves verbose, "textual" <topic>s that must be mapped separately to a shNNNN code (when possible)