Sait on osa portaalist

Euroopa Liidu mitmekeelne tesaurus

Service web EuroVoc

getConceptURIbyTermAndLang

Search a term (Preferred or Non Preferred Term) in EuroVoc and return the URIs of corresponding concept(s) or  concept (s) matching the found term(s).

Sample call with all parameters 

http://eurovoc.europa.eu/webservices/getConceptURIbyTermAndLang?term=accident&termType=prefLabel&searchMode=exact&format=TXT&lang=en

(Parameters indicated in red are mandatory)

Definition of the Web service Parameters

Parameters

 

Description

Examples

term

[mandatory] 

The search string to search for. (case insensitive)

term=accident

term=help for victims combined with searchMode=exact

 

termType

[optional]

The type of term to look for; by default, searches both PTs (Preferred Terms or prefLabel) and NPTs (Non Preferred Terms or altLabel);

If set, value can be "prefLabel" or "altLabel".

termType=prefLabel

termType=altLabel

searchMode

[mandatory] 

Defines the type of search to perform. The following value can be used: "contains", "exact", "startsWith" or "endsWith".

searchMode=contains

searchMode=exact

searchMode=startsWith

searchMode= endsWith

format

[mandatory]

Defines the format of the service response. The value can be "RDF" or "TXT".

format=RDF

format=TXT

lang

[optional]

Defines the language of EuroVoc in which the search should be performed.

If no value has been provided, all languages are searched;

If set, the search is performed in the specified language.

lang=bg

lang=es

lang=cs

lang=da

lang=en

Language values are based on the ISO 639-2 language codes.

Examples

1. Get the URI of the concept that contains the exact prefLabel "help for victims" in English. The URI is provided in TXT format.

http://eurovoc.europa.eu/webservices/getConceptURIbyTermAndLang?term=help for victims&termType=prefLabel&searchMode=exact&format=TXT&lang=en

2. Get a list of URIs for concepts that contain the term "accident" either in their prefLabel or altLabel, in any languages. The list of URIs is saved in a RDF file.

http://eurovoc.europa.eu/webservices/getConceptURIbyTermAndLang?term=accident&searchMode=contains&format=RDF

 

Using the web service

The web service can be called by a Web application or Web page using either a HTTP, where the parameters are specified in the query string, or a XML/RPC protocol.