Gene2MeSH Web Service Guide

Base URL

URL Parameters

Geneid is the entrez gene ID.

Genesymbol is the entrez gene symbol.

Taxid is the taxonomy ID from the NCBI taxonomy database.

MeSH is a Medical Subject Headings (MeSH) descriptor.

Optional. Limit sets the maximum number of returned results; it defaults to 1000 if not set.

Optional. Tool is a string with no internal spaces that identifies the resource using the service. Inclusion of this parameter allows us to track usage of the service.

Optional. Email associates an email address with the request. Inclusion of this parameter allows us to contact users if there are problems or if the software interface changes.

The following are valid parameter combinations:
geneid, genesymbol, genesymbol & taxid, mesh, mesh & taxid


The XML returned is divided into two sections. The “Request” section echos the input parameters and the values of unset parameters. The “Response” section holds the data from the query. The result set returned is ordered by the p-value of the Fisher’s Exact Test.

NOTICE: We've recently changed the XML schema for the Gene2MeSH programmatic interface. Please update your scripts accordingly.

Sample Code
Perl Example 1 - This is a example script using the Perl XPath libraries to retrieve the top 30 MeSH descriptors for a gene.
Perl Example 2 - This script combines eutils and three of NCIBI's web services: NLP, Gene2MeSH, and MiMI.