Search by

omnilab / wikidata

GlitchArt

Omnilab Wikidata: an item by Q-number, by the identifier of a science base its statements carry (PubChem CID, ChEBI, CAS, InChIKey, ChEMBL, UniProt, NCBI Gene and Taxonomy, Ensembl, GBIF, iNaturalist, SIMBAD, JPL SBDB, UNII, DSSTox, KEGG) or by label - its label, description and aliases in the langu

1.x-dev 2026-10-15 01:43 UTC

This package is auto-updated.

Last update: 2026-10-15 01:56:23 UTC


README

Wikidata for glitchr/omnilab: an item by its Q-number, by the identifier of a science base its statements carry - PubChem CID, ChEBI, CAS, InChIKey, ChEMBL, UNII, DSSTox, KEGG, UniProt, NCBI Gene, Ensembl, NCBI Taxonomy, GBIF, iNaturalist, SIMBAD, JPL SBDB - or by a label; its label, description and aliases in the language asked, those identifiers as cross-references for the Collector to follow, and a few properties with their units (mass, melting and boiling points, density, pKa, taxon name, radius...); a search by label, narrowed to a domain when asked. Through Wikidata's Action API, no key.

$wikidata = (new WikidataSourceFactory($http))->create(['mailto' => 'support@glitchr.io', 'language' => 'fr']);
$caffeine = $wikidata->entity('Q60235');
$caffeine->label;                                // caféine
$caffeine->identifier(Scheme::PUBCHEM_CID);      // 2519
$caffeine->properties('melting_point');          // 234 °C, 235 °C
$wikidata->entity(Identifier::cid(2519));        // the same, by the CID its statements carry
$wikidata->entity('CHEBI:27732');                // or its ChEBI id, CAS number, InChIKey...
$wikidata->search(new Query('caffeine', Domain::CHEMISTRY, limit: 10));
omnilab:
    sources:
        wikidata:
            factory: wikidata
            options:
                mailto: 'support@glitchr.io'   # in the User-Agent: Wikimedia refuses a call that does not say who makes it
                language: 'fr'                 # labels, descriptions, aliases; Wikidata's fallbacks after it
                synonyms: 20                   # how many aliases to keep; 0: none
                throttle: 0.3                  # 200 calls a minute for a client known by its User-Agent: never lower

With PubChem and ChEBI configured too, the Collector follows a compound from one to the others: $collector->collect('pubchem', 'caffeine') reaches Wikidata by caffeine's PubChem CID.

Terms of use

Wikidata's structured data is under CC0. Wikimedia's User-Agent policy asks every client to name itself and a way to reach its operator: a call without such a User-Agent is refused (403). The source sends omnilab/1.x (+https://github.com/glitchr-studio/omnilab; mailto:...) - set mailto, or user_agent to name your application. Wikimedia's rate limits, new in 2026, allow an unauthenticated client with such a User-Agent 200 calls a minute; the API etiquette asks for calls in series. The source leaves 0.3 s between two and an item costs two or three: cache what it answers.

See docs/ for what is read, how it maps, and what Wikidata does not give here.

License: MIT.