Skip to main content

API


As well as browsing concepts on this website, you can also query the service's API, or download the full vocabulary from the homepage. The API is hosted at http://concepts.sagepub.com:3030 (note: not HTTPS). To search and download concepts, POST a SPARQL request to the endpoint at /skosmos/query. For more information on SPARQL, see the W3C's pages on SPARQL by example.

SPARQL can be used to process much more complex queries than are possible in the interface. The example below asks the service to list events that happened during Pierre Bourdieu's lifetime, and estimate his age at the time.

POST /skosmos/query HTTP/1.1
Host: concepts.sagepub.com:3030
Content-Type: application/sparql-query

prefix dc: <http://purl.org/dc/elements/1.1/>
prefix group: <https://concepts.sagepub.com/social-science/concept/conceptgroup/>
prefix skos: <http://www.w3.org/2004/02/skos/core#>
prefix concept: <https://concepts.sagepub.com/social-science/concept/>

SELECT ?uri ?event ?date ?age FROM <https://concepts.sagepub.com/social-science/>
WHERE {
  concept:Pierre_Bourdieu dc:start ?born .
  concept:Pierre_Bourdieu dc:end ?died .
  group:events skos:member ?uri .
  ?uri skos:prefLabel ?event .
  ?uri dc:date ?date .
  ?uri dc:start ?start .
  ?uri dc:end ?end
    FILTER (?end > ?born && ?start < ?died) .
  BIND (IF (?start = ?end, STR (?end - ?born), CONCAT (STR (?start - ?born), "-", STR (?end-?born))) AS ?age)
} ORDER BY ASC(?start)

Data model

The general structure of the Social Science Thesaurus is represented with standard SKOS relationships. Most concepts have additional information where applicable, such as definitions and dates (for people and events). Below is a complete table of available fields to query.
Node Attribute Description
rdf:Description rdf:about URI for the concept. This node is a container for all information about a concept.
skos:prefLabel The preferred term for a concept or group of concepts.
skos:altLabel Other terms that can be used for the concept, usually a synonym or abbreviation.
skos:broader rdf:resource The URI for the concept's parent concept(s).
skos:narrower rdf:resource The URI for the concept's child concept(s).
skos:related rdf:resource The URI for the concept's related concepts(s).
skos:topConceptOf rdf:resource If the concept is a top-level concept, the URI of the concept scheme for which it is a top-level concept.
skos:exactMatch rdf:resource The URI for the concept in other vocabularies, such as MeSH or Wikipedia.
skos:definition A short definition of the concept, or in the case of a person, a mini biography.
dc:date In the case of an event, the date or date range the event took place. In the case of a person, the date range they were alive. Formatted as YYYY or YYYY-YYYY.
dc:start The year in which an event started or a person was born, formatted as YYYY.
dc:end The year in which an event ended or a person died, formatted as YYYY.
isothes:ConceptGroup rdf:about URI for a group of concepts. This node contains a skos:prefLabel for the group and a list of concepts within it. Concepts are classed as cases, events, laws, methods, organizations, people, theories or concepts (for general concepts not elsewhere classified).  
skos:member rdf:resource URI for a member of the concept group.

Terminology Service layout designed by Hahmo Design

Skosmos version