Ġabra API v2.13.0 Updated 2020-07-04

This site is aimed at developers who want to access the Ġabra database programmatically, such as from a website or app. If you just want to search the database normally, you should do so from the Ġabra website.

General

Operations

Search lexemes

This returns the lexeme entries (although it searches in wordforms too by default).

/lexemes/search?s=ktibt

Argument Description Example Notes
s Search query kiteb
l Search in lemmas? 0 or 1 (default) Mininum length 2
wf Search in wordforms? 0 or 1 (default) Mininum length 3; prefix matching only
g Search in gloss? 0 or 1 (default) Mininum length 3
pos Part of speech NOUN (see here)
source Source Ellul2013
pending Include pending entries? 0 (default) or 1
page Page number 1 (default), 2, ...  

Paging

The results are paged. This works as follows:

Search lexeme glosses Since v2.9

Unlike /lexemes/search, this command uses a special text index on the glosses to return results which are sorted based on text-closeness. It also performs stemming and stop-word removal on your query. If only searching by English gloss, this command will return better results. For more flexibility and additional filtering, use the command above (with the g flag).

/lexemes/search_gloss?s=find

Argument Description Example Notes
s (required) Search query find Should be in English

Paging should work as above.

Load lexeme

Load a lexeme from its ID.

/lexemes/5200a366e36f237975000f26

Argument Description Example
:id (required) Lexeme ID 5200a366e36f237975000f26

Load wordforms

Load the wordforms for a particular lexeme.

/lexemes/wordforms/5200a366e36f237975000f26

Argument Description Example
:id (required) Lexeme ID 5200a366e36f237975000f26
match Limit to surface forms matching substring kom
pending Include pending entries? 0 (default) or 1
exclude_sources Exclude wordforms from given sources Camilleri2013,Apertium2014
sort Sort wordforms 0 or 1 (default)

Load lexemes which are related to a given lexeme. Currently this only uses root information, but may be extended to include other relations. The results are sorted by part of speech and derived form, and will not include the original lexeme.

/lexemes/related/5200a366e36f237975000f26

Argument Description Example
:id (required) Lexeme ID 5200a366e36f237975000f26

Search suggest Changed in v2.13

Find matching words which vary in spelling (diacritics, character case) of the search term, from lemmas or wordforms:

/lexemes/search_suggest?s=Hareg

/wordforms/search_suggest?s=ohorgu

Argument Description Example
s (required) Search query Hareg

Lemmatise

Similar to lexemes/search but also returns matching wordform info.

/lexemes/lemmatise?s=ktibniehom

Argument Description Example
s (required) Surface form (regex) ktibnie?hom

Search for root

Example:

/roots/search?s=k-t-b

/roots/search?c1=k&c3=b

Argument Description Example
s (required) Search query (regex) k-t-b, s-r-v-j, ^b-.-[jw]$
c1,c2,c3,c4 Radicals at positions 1–4 (overrides s)
r Search in radicals? 0 or 1 (default)
l Search in lemma? 0 or 1 (default)
g Search in gloss? 0 or 1 (default)
t Root type strong, geminated, weak-initial, weak-medial, weak-final, irregular
page Page number 1 (default), 2, ...

All radicals should be in lower case. A dot . will also match the digraph .

The results are paged.

Load root Since v2.10.1

Load a root from its radicals and variant.

/roots/k-t-b

/roots/b-r-d/2

Argument Description Example
:radicals (required) Root radicals k-t-b, s-r-v-j
:variant Root variant 1, 2, ...

Load lexemes by root Since v2.5

Load lexemes with a given root. The results are sorted by part of speech and derived form.

/roots/lexemes/k-t-b

/roots/lexemes/b-r-d/2

Argument Description Example
:radicals (required) Root radicals k-t-b, s-r-v-j
:variant Root variant 1, 2, ...

List all sources Since v2.6

List all sources (from the sources collection).

/sources/

Load source Since v2.4

Load a source from its key.

/sources/Falzon2013

Argument Description Example
:key (required) Source key Falzon2013

Internationalisation (i18n) Since v2.3

You can get English & Maltese names for all the field names and values:

/i18n/all?lang=mlt

Argument Description Example
lang Language eng (default) or mlt

Counts Since v2.10.0

Get counts of all entities in database. These commands take no parameters.

/lexemes/count

/wordforms/count

/roots/count

Random Since v2.11.1

Get a random entry.

/lexemes/random