OpenCyc Web Services

Description of OpenCyc web services.
WADL

Resources

/webservices/concept/find?str&maxResults&startingFrom&uriType&conceptDetails&includeMatchedText&searchType&matchType&ignoreCase

Methods

GET

This webservices returns basic information about Cyc concepts. The concept may be searched using a variety of identifiers including natural language. Enter: http://ws.opencyc.org/webservices/concept/find in a browser for a convenient form. Automated clients should set the "Accept" header to "application/xml".

request query parameters
parametervaluedescription

str

string (required)

A string (possibly a partial string) representation of a Cyc concept about which more information is sought.

maxResults

positiveInteger

Default: 100

The maximum number of results that should be returned. (Note that there may be server-specific limits that cause results to be truncated earlier than specified.) A value of 0 or less for this paramter will cause an error to be returned.

startingFrom

integer

Default: 0

The index from which returned results should begin. For instance, if the number of results available in a previous query exceeded that specified by maxResults, then the results from that earlier were likely truncated. Making the same call again, except with this paramter set to the total number of all previous results, will get the next batch of results.

uriType

One of:

  • current (default)
  • versioned
  • readable

The URI style that will be used in the return values of any Cyc concepts included in the response. Permitted values include: "current", "versioned", and "readable". Example "current" URI: http://sw.opencyc.org/concept/Mx4rvkS9GZwpEbGdrcN5Y29ycA Example "versioned" URI: http://sw.opencyc.org/2009/04/07/concept/Mx4rvkS9GZwpEbGdrcN5Y29ycA Example "readable" URI: http://sw.opencyc.org/2009/04/07/concept/en/Game

conceptDetails

One of:

  • min
  • type
  • typical
  • detailed
  • preferredNl (default)
  • allNl

This parameter indicates the amount of detail that should be returned for any Cyc concepts that are found. Permitted values include: "min", "type", "typical", "preferredNl", and "allNl". "Min" will return just the basic URI for the concept. "Typical" gives fields that are most commonly requested (various ids, nl, and comments). "preferredNl" returns the preferred natural language for the concept. "allNl" returns the preferred natural language representation for the concept as well as any natural language aliases that are known for that concept.

includeMatchedText

One of:

  • true
  • false (default)

This parameter indicates whether to return the matched text. If set to true, every returned "concept" will include a member called "matchedText" which includes the full text of the string that caused the concept to be matched.

searchType

One of:

  • any (default)
  • externalId
  • owlId
  • cycl
  • anyNl
  • preferredNl

This parameter indicates how the "str" paramter should be interpreted. Permitted values include: "any", "externalId", "owlId", "cycl", "anyNl", and "preferredNl".

matchType

One of:

  • exactMatch (default)
  • prefixMatch

This parameter indicates whether the parameter "str" should be treated as an exact match (exactMatch) or as a prefix match (prefixMatch).

ignoreCase

boolean

Default: true

This parameter indicates whether the case (i.e., uppercase/lowercase) of the text in the parameter "str" should be ignored.

available response representations:

/webservices/concept/taxonomy?externalId&microTheoryExternalId&relation&direction&directOnly&maxResults&startingFrom&conceptDetails&uriType

Methods

GET

This webservices returns basic taxonomic information about a Cyc concept specified by its external id. The returned results are unordered. Enter: http://ws.opencyc.org/webservices/concept/taxonomy in a browser for a convenient form. Automated clients should set the "Accept" header to "application/xml".

request query parameters
parametervaluedescription

externalId

string (required)

The external id of the Cyc concept for which taxonomic information should be retrieved.

microTheoryExternalId

string

Default: Mx4rvn8EG5wpEbGdrcN5Y29ycA

The external id of the Cyc concept representing the microtheory from which taxonomic information should be retrieved. The default is "Mx4rvn8EG5wpEbGdrcN5Y29ycA" (EverythingPSC) which will cause all taxonomic information to be retrieved from all microtheories.

relation

One of:

  • typeOf (default)
  • instanceOf
  • broaderTerm

The type of taxonomic information to retrieve. Permitted values are "typeOf", "instanceOf", and "broaderTerm". "typeOf" indicates a specialization of a type: e.g. "beagles" are a type of "dog". "instanceOf" specifies a member of collection: e.g., "Snoopy" is a member of the collection of all "dogs". Note that it is possible for a collection to be an "instanceOf" another collection: e.g., the collection "hounds" is an instance of the collection "dog types by functional group". "broaderTerm" indicates that one term is broader than the other along any of numerous dimensions: e.g., "astronomy" is broader than "astrophysics" since the latter is a subfield of the former; a "tent" is broader than a "rivet" because the latter is part of the former. "broaderTerm" is a very loose relationship and should be used with caution.

direction

One of:

  • moreGeneral (default)
  • moreSpecific

The direction to search for taxonomic information. One of: "moreGeneral" or "moreSpecific".

directOnly

boolean

Default: true

This parameter indicates whether only directly asserted information should be returned (true) or whether to include inferred (i.e., concluded) results as well (false).

maxResults

positiveInteger

Default: 100

The maximum number of results that should be returned. Note, there may be server-specific limits that cause results to be truncated earlier than specified. A value of 0 or less for this parameter will result in an error.

startingFrom

integer

Default: 0

The index from which returned results should begin. For instance, if the number of results available in a previous query exceeded that specified by maxResults, then the results from that earlier were likely truncated. Making the same call again, except with this paramter set to the total number of all previous results, will get the next batch of results.

conceptDetails

One of:

  • min
  • type
  • typical
  • detailed
  • preferredNl (default)
  • allNl

This parameter indicates the amount of detail that should be returned for any Cyc concepts that are found. Permitted values include: "min", "type", "typical", "preferredNl", and "allNl". "Min" will return just the basic URI for the concept. "Typical" gives fields that are most commonly requested (various ids, nl, and comments). "preferredNl" returns the preferred natural language for the concept. "allNl" returns the preferred natural language for the concept as well as any natural language aliases that are known for that concept.

uriType

One of:

  • current (default)
  • versioned
  • readable

The URI style that will be used in the return values of any Cyc concepts included in the response. Permitted values include: "current", "versioned", and "readable". Example "current" URI: http://sw.opencyc.org/concept/Mx4rvkS9GZwpEbGdrcN5Y29ycA Example "versioned" URI: http://sw.opencyc.org/2009/04/07/concept/Mx4rvkS9GZwpEbGdrcN5Y29ycA Example "readable" URI: http://sw.opencyc.org/2009/04/07/concept/en/Game

available response representations:

/webservices/concept/random?maxResults&conceptDetails&uriType

Methods

GET

This webservices returns randomly chosen concepts. Enter: http://ws.opencyc.org/webservices/concept/random in a browser for a convenient form. Automated clients should set the "Accept" header to "application/xml".

request query parameters
parametervaluedescription

maxResults

positiveInteger

Default: 1

The maximum number of results that should be returned. Note, there may be server-specific limits that cause results to be truncated earlier than specified. A value of 0 or less for this parameter will result in an error.

conceptDetails

One of:

  • min
  • type
  • typical
  • detailed
  • preferredNl (default)
  • allNl

This parameter indicates the amount of detail that should be returned for any Cyc concepts that are found. Permitted values include: "min", "type", "typical", "preferredNl", and "allNl". "Min" will return just the basic URI for the concept. "Typical" gives fields that are most commonly requested (various ids, nl, and comments). "preferredNl" returns the preferred natural language for the concept. "allNl" returns the preferred natural language for the concept as well as any natural language aliases that are known for that concept.

uriType

One of:

  • current (default)
  • versioned
  • readable

The URI style that will be used in the return values of any Cyc concepts included in the response. Permitted values include: "current", "versioned", and "readable". Example "current" URI: http://sw.opencyc.org/concept/Mx4rvkS9GZwpEbGdrcN5Y29ycA Example "versioned" URI: http://sw.opencyc.org/2009/04/07/concept/Mx4rvkS9GZwpEbGdrcN5Y29ycA Example "readable" URI: http://sw.opencyc.org/2009/04/07/concept/en/Game

available response representations:

Representations

application/xml (ocyc:concepts)

XML Schema

Source: http://ws.opencyc.org/xsd/CycConcepts.xsd

application/xml (ocyc:concepts)

XML Schema

Source: http://ws.opencyc.org/xsd/CycConcepts.xsd

application/xml (ocyc:concepts)

XML Schema

Source: http://ws.opencyc.org/xsd/CycConcepts.xsd