Swoogle Home

Documentation

publications
manual
news

Login Form






Lost Password?
No account yet? Register

BSQ Sitestats Summary

Site Stats Summary
  Hits Visitors
Today 2913 396
Week 22759 2091

Swoogle Manual


Swoogle Web Services


Overview

Swoogle provides search services using REST interface[1], i.e. you may compose your query in an HTTP GET query and retrieve the result as a dynamic web page encoded in RDF/XML. Several  ontologies [2,3] are designed to semantically encode the metadata of the Semantic Web and the description of query results.

[1] Roy Thomas Fielding, Architectural Styles and the Design of Network-based Software Architectures, PhD dissertation (chapter 5)
[2] The Web Of Belief (WOB) ontology - metadata about the Semantic Web.  http://daml.umbc.edu/ontologies/webofbelief/1.4/wob.owl
[3] The Swoogle ontology - Swoogle query encoding. http://daml.umbc.edu/ontologies/webofbelief/1.4/swoogle.owl


Composing a REST query

A query is represented as a URL,

    REST_QUERY ::=    SERVICE_URI  ?  PARAMS

e.g. http://sparql.cs.umbc.edu:80/swoogle31/q?queryType=search_swd_ontology&searchString=service&key=demo

The following are some common query parameters supported by Swoogle

Param-name Default value Range Comments
queryType null string Required
searchString null string Required, the search String should always be escaped
searchStart 1 Non-negative integer (1-based) optional, return results starting from the specified number. "search_XX" services return at most 10 results per query, and the other services returns 100 results per query.
key null string Required for external access, contact Swoogle administrator to obtain access keys. The 'demo' key only returns the first 25 results.

 


Search Services (powered by Apache Lucene)

[1] Search ontology
description Search semantic web documents which are classified as ontologies (ontoRatio>0 )
service-uri http://sparql.cs.umbc.edu:80/swoogle31/q
parameters
  • queryType:   search_swd_ontology
  • searchString:    see How to search Semantic Web documents
  • searchSortField:  any of the following
    • hasOntoRank (default)
    • hasDateLastmodified  - when the document has been last modified
    • hasLength - size of the document
    • hasCntTriple - number of triples
    • hasOntoRatio - percent of triples contributing to ontological definition
    • hasCntSwt - number of distinct terms
    • hasCntInstance - number of distinct class-instance
  • searchSortReverse:  {true, false}, whether or not reverse the order of the sorted results
  • searchStart:
  • key
response content-type text/xml
response RDF syntax RDF/XML
example search for ontologies defining the concept `person'
http://sparql.cs.umbc.edu:80/swoogle31/q?queryType=search_swd_ontology&searchString=person&key=demo 

 

[2] Search documents
description Search all semantic web documents
service-uri http://sparql.cs.umbc.edu:80/swoogle31/q
parameters
  • queryType:   search_swd_all
  • searchString:    see How to search Semantic Web documents
  • searchSortField:  any of the following
    • hasOntoRank (default)
    • hasDateLastmodified  - when the document has been last modified
    • hasLength - size of the document
    • hasCntTriple - number of triples
    • hasOntoRatio - percent of triples contributing to ontological definition
    • hasCntSwt - number of distinct terms
    • hasCntInstance - number of distinct class-instance
  • searchSortReverse:  {true, false}, whether or not reverse the order of the sorted results
  • searchStart:
  • key
response content-type text/xml
response RDF syntax RDF/XML
example search for semantic web documents related to `person'
http://sparql.cs.umbc.edu:80/swoogle31/q?queryType=search_swd_all&searchString=person&key=demo 

 

[3] Search terms
description Search all semantic web terms (RDF resources with URI being defined/referenced/populated as class/properties in semantic web documents)
service-uri http://sparql.cs.umbc.edu:80/swoogle31/q
parameters
  • queryType:   search_swt
  • searchString:    see How to search semantic web terms
  • searchSortField:  any of the following
    • hasTermRank (default)
  • searchSortReverse:  {true, false}, whether or not reverse the order of the sorted results
  • searchStart:
  • key
response content-type text/xml
response RDF syntax RDF/XML
example search for semantic web terms related to `person'
http://sparql.cs.umbc.edu:80/swoogle31/q?queryType=search_swt&searchString=person&key=demo   

 


Digest services (powered by database query)

[4] Digest semantic web document
description Show Swoogle metadata for the present semantic web document and list triples annotating it.
service-uri http://sparql.cs.umbc.edu:80/swoogle31/q
parameters
  • queryType:   digest_swd
  • searchString:    the URL of the present semantic web document
  • key
response content-type text/xml
response RDF syntax RDF/XML
example search for metadata about the semantic web document  'http://xmlns.com/foaf/0.1/index.rdf'
http://sparql.cs.umbc.edu:80/swoogle31/q?queryType=digest_swd&searchString=http%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2Findex.rdf&key=demo   

   

[5] Digest semantic web term
description Show Swoogle metadata for the present semantic web term and list triples defining it.
service-uri http://sparql.cs.umbc.edu:80/swoogle31/q
parameters
  • queryType:   digest_swt
  • searchString:    the URI of the present semantic web term
  • key
response content-type text/xml
response RDF syntax RDF/XML
example search for metadata about the semantic web term  'http://xmlns.com/foaf/0.1/Person'
http://sparql.cs.umbc.edu:80/swoogle31/q?queryType=digest_swt&searchString=http%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2FPerson&key=demo 

 

[6] Digest semantic web namespace
description Show Swoogle metadata for the present semantic web namespace (i.e. a special class of RDF resources being used as namespace) and list related prefixes.
service-uri http://sparql.cs.umbc.edu:80/swoogle31/q
parameters
  • queryType:   digest_ns
  • searchString:    the URI of the present semantic web namespace
  • key
response content-type text/xml
response RDF syntax RDF/XML
example search for metadata about the semantic web namespace  'http://xmlns.com/foaf/0.1/'
http://sparql.cs.umbc.edu:80/swoogle31/q?queryType=digest_ns&searchString=http%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F&key=demo 

 


Relation services (powered by database query)

[7] list document out-links  (doc=>doc)
description List semantic web documents linked by the present semantic web document.
service-uri http://sparql.cs.umbc.edu:80/swoogle31/q
parameters
  • queryType:   rel_swd_swd_from
  • searchString:    the URL of the present semantic web document
  • searchStart:   >=1
  • key
response content-type text/xml
response RDF syntax RDF/XML
example documents linked by  'http://www.site.uottawa.ca/~mkhedr/Ontologies/Time'
http://sparql.cs.umbc.edu:80/swoogle31/q?queryType=rel_swd_swd_from&searchString=http%3A%2F%2Fwww.site.uottawa.ca%2F%7Emkhedr%2FOntologies%2FTime&key=demo 

   

[8] list document in-links  (doc=>doc)
description List semantic web documents linking to the present semantic web document.
service-uri http://sparql.cs.umbc.edu:80/swoogle31/q
parameters
  • queryType:   rel_swd_swd_to
  • searchString:    the URL of the present semantic web document
  • searchStart:   >=1
  • key
response content-type text/xml
response RDF syntax RDF/XML
example documents linking to   'http://www.site.uottawa.ca/~mkhedr/Ontologies/Time'
http://sparql.cs.umbc.edu:80/swoogle31/q?queryType=rel_swd_swd_to&searchString=http%3A%2F%2Fwww.site.uottawa.ca%2F%7Emkhedr%2FOntologies%2FTime&key=demo 

 

[9] list terms in document  (doc=>term)
description List semantic web terms defined/referenced/populated by the present semantic web document.
service-uri http://sparql.cs.umbc.edu:80/swoogle31/q
parameters
  • queryType:   rel_swd_swt
  • searchString:    the URL of the present semantic web document
  • searchStart:   >=1
  • key
response content-type text/xml
response RDF syntax RDF/XML
example semantic web terms defined/referenced/populated by  'http://www.site.uottawa.ca/~mkhedr/Ontologies/Time'
http://sparql.cs.umbc.edu:80/swoogle31/q?queryType=rel_swd_swt&searchString=http%3A%2F%2Fwww.site.uottawa.ca%2F%7Emkhedr%2FOntologies%2FTime&key=demo 

  

[10] list namespaces used  by document  (doc=>namespace)
description List semantic web namespaces used by the present semantic web document.
service-uri http://sparql.cs.umbc.edu:80/swoogle31/q
parameters
  • queryType:   rel_swd_ns
  • searchString:    the URL of the present semantic web document
  • searchStart:   >=1
  • key
response content-type text/xml
response RDF syntax RDF/XML
example namespaces described by  'http://www.site.uottawa.ca/~mkhedr/Ontologies/Time'
http://sparql.cs.umbc.edu:80/swoogle31/q?queryType=rel_swd_ns&searchString=http%3A%2F%2Fwww.site.uottawa.ca%2F%7Emkhedr%2FOntologies%2FTime&key=demo 

 

[11] list terms using namespace (namespace=>term)
description List semantic web terms using  the present namespace
service-uri http://sparql.cs.umbc.edu:80/swoogle31/q
parameters
  • queryType:   rel_ns_swt
  • searchString:    the URL of the present namespace
  • searchStart:   >=1
  • key
response content-type text/xml
response RDF syntax RDF/XML
example terms using namespace 'http://xmlns.com/foaf/0.1/'
http://sparql.cs.umbc.edu:80/swoogle31/q?queryType=rel_ns_swt&searchString=http%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F&key=demo 

 

[12] list documents using namespace (namespace=>doc)
description List semantic web documents using the present namespace
service-uri http://sparql.cs.umbc.edu:80/swoogle31/q
parameters
  • queryType:   rel_ns_swd
  • searchString:    the URL of the present namespace
  • searchStart:   >=1
  • key
response content-type text/xml
response RDF syntax RDF/XML
example documents using namespace 'http://xmlns.com/foaf/0.1/'
http://sparql.cs.umbc.edu:80/swoogle31/q?queryType=rel_ns_swd&searchString=http%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F&key=demo 

  

[13] list documents using term (term=>doc)
description List semantic web documents defining/referencing/populating the present semantic web term
service-uri http://sparql.cs.umbc.edu:80/swoogle31/q
parameters
  • queryType:   rel_swt_swd
  • searchString:    the URL of the present semantic web term
  • searchStart:   >=1
  • key
response content-type text/xml
response RDF syntax RDF/XML
example documents using  'http://xmlns.com/foaf/0.1/Person'
http://sparql.cs.umbc.edu:80/swoogle31/q?queryType=rel_swt_swd&searchString=http%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2FPerson&key=demo 

 

[14] list term definition (term=>triples)
description List triples contributing definition of the present semantic web term
service-uri http://sparql.cs.umbc.edu:80/swoogle31/q
parameters
  • queryType:   rel_swt_swt_from
  • searchString:    the URL of the present semantic web term
  • searchStart:   >=1
  • key
response content-type text/xml
response RDF syntax RDF/XML
example triples defining  'http://xmlns.com/foaf/0.1/Person'
http://sparql.cs.umbc.edu:80/swoogle31/q?queryType=rel_swt_swt_from&searchString=http%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2FPerson&key=demo 

 

[15] list definition dependency (term=>term)
description List semantic web terms whose definition depends on the present semantic web term
service-uri http://sparql.cs.umbc.edu:80/swoogle31/q
parameters
  • queryType:   rel_swt_swt_to
  • searchString:    the URL of the present semantic web term
  • searchStart:   >=1
  • key
response content-type text/xml
response RDF syntax RDF/XML
example terms defined by 'http://xmlns.com/foaf/0.1/Person'
http://sparql.cs.umbc.edu:80/swoogle31/q?queryType=rel_swt_swt_to&searchString=http%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2FPerson&key=demo 

 

[16] list domain classes of a property (term=>term)
description List semantic web terms which are used as the "rdfs:domain" of the present semantic web in class-instances
service-uri http://sparql.cs.umbc.edu:80/swoogle31/q
parameters
  • queryType:   rel_swd_instance_domain_p2c
  • searchString:    the URL of the present semantic web term
  • searchStart:   >=1
  • key
response content-type text/xml
response RDF syntax RDF/XML
example domain classes of  'http://xmlns.com/foaf/0.1/name'
http://sparql.cs.umbc.edu:80/swoogle31/q?queryType=rel_swd_instance_domain_p2c&searchString=http%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2Fname&key=demo 

 

[17] list properties of a domain class (term=>term)
description List semantic web terms which use the present semantic web term as their "rdfs:domain" in class-instances.
service-uri http://sparql.cs.umbc.edu:80/swoogle31/q
parameters
  • queryType:   rel_swd_instance_domain_c2p
  • searchString:    the URL of the present semantic web term
  • searchStart:   >=1
  • key
response content-type text/xml
response RDF syntax RDF/XML
example properties of  'http://xmlns.com/foaf/0.1/Person'
http://sparql.cs.umbc.edu:80/swoogle31/q?queryType=rel_swd_instance_domain_c2p&searchString=http%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2FPerson&key=demo 

 

[18] list range classes of a property (term=>term)
description List semantic web terms which are used as the "rdfs:range" of the present semantic web in class-instances
service-uri http://sparql.cs.umbc.edu:80/swoogle31/q
parameters
  • queryType:   rel_swd_instance_range_p2c
  • searchString:    the URL of the present semantic web term
  • searchStart:   >=1
  • key
response content-type text/xml
response RDF syntax RDF/XML
example range classes of  'http://xmlns.com/foaf/0.1/name'
http://sparql.cs.umbc.edu:80/swoogle31/q?queryType=rel_swd_instance_range_p2c&searchString=http%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2Fname&key=demo 

 

[19] list properties of a range class (term=>term)
description List semantic web terms which use the present semantic web term as their "rdfs:range" in class-instances.
service-uri http://sparql.cs.umbc.edu:80/swoogle31/q
parameters
  • queryType:   rel_swd_instance_range_c2p
  • searchString:    the URL of the present semantic web term
  • searchStart:   >=1
  • key
response content-type text/xml
response RDF syntax RDF/XML
example properties having range  'http://xmlns.com/foaf/0.1/Person'
http://sparql.cs.umbc.edu:80/swoogle31/q?queryType=rel_swd_instance_range_c2p&searchString=http%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2FPerson&key=demo 

manual  o   news  o   faq  o   web-service  o   submit-url  o   sw-archive  o   feedback  o   swoogle2005

Swoogle © 2004-2007, ebiquity group at UMBC
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License.