US Government Web Services and XML Data Sources
Load and stress tested with SiteBlaster
Home     Index     About     Contact     Examples     Help      Mobile Apps 
US Government Data Sources

Authorities and Vocabulary Service

Department: Independent Agency
Agency: Library of Congress (LOC) ( )
Sub Agency: Library of Congress Online Catalog ( )
The Library of Congress Authorities and Vocabularies service ( ) enables both humans and machines to programmatically access authority data at the Library of Congress via URIs. This service is influenced by -- and implements -- the Linked Data movement's approach of exposing and inter-connecting data on the Web via dereferenceable URIs.

The Library of Congress Subject Headings (LCSH) is the first vocabulary to be included in the Authorities and Vocabularies service. Additional vocabularies to be included are:

• Thesaurus of Graphic Materials
• MARC Geographic Area Codes
• MARC Language Codes
• MARC Relator Codes

LCSH has been actively maintained since 1898 to catalog materials held at the Library of Congress. By virtue of cooperative cataloging, other libraries around the United States also use LCSH to provide subject access to their collections. In addition LCSH is used internationally, often in translation.
Help/Documentation: ,
WSDL/Data Location:
The service is invoked by submitting an Http GET request to the following URI:{identifier} where {identifier} is the identifier assigned to the subject heading.

Library of Congress Subject Heading identifiers can be downloaded individually or collectively as a compressed file (i.e. .zip file) from


Support: ,
Example: LCSH

System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
System.Xml.XmlDocument xmlDocBody = new System.Xml.XmlDocument();

// load an individual subject heading

Process the downloaded Subject Headings (i.e. the decompressed RDF/XML file)

* Note: the structure of a description node is as follows

    <rdf:Description rdf:about="" xmlns:rdf="">
    <dcterms:created rdf:datatype="" xmlns:dcterms="">1986-02-11T00:00:00-04:00</dcterms:created>
    <skos:inScheme rdf:resource="" xmlns:skos="" />
    <skos:inScheme rdf:resource="" xmlns:skos="" />
    <rdf:type rdf:resource="" />
    <skos:related rdf:resource="" xmlns:skos="" />
    <skos:prefLabel xml:lang="en" xmlns:skos="">Service industries--Taxation</skos:prefLabel>
    <owl:sameAs rdf:resource="info:lc/authorities/sh85120352" xmlns:owl="" />
    <dcterms:modified rdf:datatype="" xmlns:dcterms="">1986-02-11T00:00:00-04:00</dcterms:modified>


// load the subject headings into an XML Document

//create a name space manager so that the XML document can be processed by XPath
XmlNamespaceManager nsMgr = new XmlNamespaceManager(new NameTable());
nsMgr.AddNamespace("rdf", "");
nsMgr.AddNamespace("skos", "");
nsMgr.AddNamespace("dcterms", "");
nsMgr.AddNamespace("owl", "");
nsMgr.AddNamespace("rdfs", "");
nsMgr.AddNamespace("xs", "");

// get the first rdf:Description node
System.Xml.XmlNode nodeDescription = xmlDocBody.SelectSingleNode("//rdf:Description", nsMgr);
int i = 0;

// iterate thru all of the remaining rdf:Description nodes
while (nodeDescription != null)
    string aboutURL = nodeDescription.Attributes.GetNamedItem("rdf:about").Value;
    string label = nodeDescription.SelectSingleNode("skos:prefLabel", nsMgr).InnerText;
    nodeDescription = nodeDescription.NextSibling;

MessageBox.Show("There were " + i.ToString() + " rdf:Description nodes");

Terms of Use     Contact     Mobile    

Copyright © 2008-2016 All rights reserved.