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, USGS earthquake, UNII, DSSTox, KEGG) or by label - its label, description and ali

1.x-dev 2026-10-26 05:24 UTC

This package is auto-updated.

Last update: 2026-10-26 10:05:44 UTC


README

Wikidata for omnisense/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, USGS earthquake, Reactome, Gaia, the NASA Exoplanet Archive, HGNC, OMIM, Mondo, Orphanet, HPO, EFO, ClinVar, dbSNP, GO, InterPro, Pfam, EC, WoRMS, ITIS, the Catalogue of Life, PBDB, eBird, the IUCN, the Minor Planet Center, a USGS water site, CODATA - or by a label; its label, description and aliases in the language asked, those identifiers as cross-references for the Collector to follow (a protein's EC class and InterPro entry, a compound's COD structures and Materials Project material as related things), and a few properties with their units (mass, melting and boiling points, density, pKa, taxon name, radius, an earthquake's magnitude...); 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. From an item into the other sources: collect('wikidata', 'Q14905542', 1, ['hgnc']) (the HBB gene, by its HGNC id), collect('wikidata', 'Q118931', 1, ['mpc']) (Apophis, by its MPC number), collect('wikidata', 'Q460967', 1, ['ebird', 'itis', 'worms', 'col']) (the American Robin).

Property Scheme Read as
P662, P683, P231, P235, P234, P592, P652, P3117, P665 pubchem.cid, chebi, cas, inchikey, inchi, chembl, unii, dsstox, kegg identifiers
P352, P351, P594, P3937 uniprot, ncbi.gene, ensembl, reactome identifiers
P354, P492, P5270, P1550, P3841, P11956, P1929, P6861 hgnc, omim, mondo, orphanet, hp, efo, clinvar, dbsnp identifiers
P686, P2926, P3519, P591 go, interpro, pfam, ec identifiers; on a gene's or a protein's item, related (go, domain, domain, enzyme)
P9824, P9902 cod, materialsproject related (structure)
P685, P14607, P846, P3151, P850, P815, P10585, P10907, P3444, P627 ncbi.taxon, gbif (twice), inaturalist, worms, itis, col, pbdb, ebird, iucn identifiers
P3083, P716, P13228, P5667, P5736 simbad, jpl.sbdb, gaia, exoplanet, mpc identifiers
P3196, P13020, P1645 usgs.event, usgs.site, codata identifiers

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-omnisense/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.

Responsibility

This package is an independent, unofficial client: it is not affiliated with, endorsed by or sponsored by the Wikimedia Foundation (Wikidata). It reaches their service on behalf of whoever runs it, and it does not redistribute their data beyond the short excerpts recorded as test fixtures. Its MIT licence covers this package's code only and grants no right to the service or to its data.

Whoever installs and runs this package is responsible for complying with the terms above, for obtaining whatever they require (an account, a key, a licence or subscription, an attribution or a citation, a rate limit to respect), and for any use made of what it returns. The authors publish it free of charge, make no commercial use of it, and accept no liability for how it is used (see LICENSE).

License: MIT.