# Text search The search box on every RNAcentral page searches sequence descriptions, genes, species, expert databases and publications. Plain keywords are often enough; the syntax below narrows the results. (exact-matching)= ## Exact matching Use double quotes (**""**) to search for exact matches. *Example*: `"hsa-mir-21"` will find only *hsa-mir-21* and not *hsa-mir-212*. (wildcards)= ## Wildcards A wildcard character (**\***) can match any number of characters. Wildcards are added automatically to search terms that are **not** enclosed in double quotes, except terms shorter than three characters, DOIs and Rfam family identifiers. *Example*: a search for `HOTAIR` (no double quotes) will find both *HOTAIR* and *HOTAIRM1* genes, and a search for `"HOTAIR"` (with double quotes) will find only *HOTAIR*. (field-specific-search)= ## Field-specific search Search can be restricted to specific fields using the **field_name:"field value"** syntax. Please note that "field value" **must be enclosed in double quotes**. | Field | Examples | | --- | --- | | **expert database** | `expert_db:"tmrna website"`, `expert_db:"mirbase"` (the "Expert databases" facet on any results page lists the names) | | **NCBI taxonomic identifier** | `taxonomy:"9606"` where [9606](https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id=9606) is the NCBI taxonomy id for *Homo sapiens* | | **taxonomy string** | `tax_string:"primates"` (searches a whole taxonomic group) | | **scientific species name** | `species:"Mus musculus"` or `tax_string:"Mus musculus"` | | **common species name** | `tax_string:"mouse"` | | **RNA type** | `rna_type:"pirna"` or `so_rna_type_name:"pirna"` (the latter is classified using Sequence Ontology) | | **gene** | `gene:"hotair"` | | **organelle** | `organelle:"mitochondrion"`, `organelle:"plastid"` | | **description** | `description:"16S"` | | **length** | `length:"1500"`, `length:[9000 TO 10000]` (supports range queries) | | **publication title** | `pub_title:"Danish population"` | | **author** | `author:"Girard A."` | | **PubMed id** | `pubmed:"17881443"` | | **Digital Object Identifier** | `doi:"10.1093/nar/19.22.6328"` | | **MD5** | `md5:"020711a90d35bb197e29e085595dd52e"` (the [MD5](https://en.wikipedia.org/wiki/MD5) hash of the sequence written as uppercase DNA) | | **interacting protein** | `interacting_protein:"ENSG00000277791"` | | **interacting RNA** | `interacting_rna:"ENSG00000235652"` | | **evidence for interaction** | `evidence_for_interaction:"ago-ip"` | | **secondary structure** | `has_secondary_structure:"True"` | | **conserved structure** | `has_conserved_structure:"True"` | | **GO annotation** | `has_go_annotations:"True"` | | **genome location** | `has_genomic_coordinates:"True"` | | **any interacting protein** | `has_interacting_proteins:"True"` | | **any interacting RNA** | `has_interacting_rnas:"True"` | | **LitScan publications** | `has_lit_scan:"True"` | | **LitSumm AI summary** | `has_litsumm:"True"` | | **RNA editing events** | `has_editing_event:"True"` | (logic-operators)= ## Logic operators Operators can be typed in upper or lower case. * **AND** (default) Multiple search terms separated by white spaces are combined using AND, so a query like `Homo sapiens` is treated as `Homo AND sapiens` and only entries having both terms will be found. * **OR** (to indicate equivalence) *Example*: `rna_type:"pirna" OR rna_type:"mirna"` * **NOT** (to indicate exclusion) *Example*: `expert_db:"lncrnadb" NOT expert_db:"rfam"` (grouping)= ## Grouping Use parentheses to group and nest logical terms. *Example*: `(expert_db:"mirbase" OR expert_db:"lncrnadb") NOT expert_db:"rfam"` (tips)= ## Search tips * Make sure your **spelling** is correct. *Example*: misspelled terms like `Esherichia` (missing "c") won't find any results. * Use **full species names**. *Example*: use `Escherichia coli` and not `E. coli` as your search terms. (text-search-download)= ## Download search results The RNAcentral text search supports exporting any number of search results in the following formats: - FASTA - Parquet - JSON - RNAcentral IDs - Hugging Face Dataset (requires a Hugging Face account) Also refer to the [public Postgres database](database.md) and the [RNAcentral FTP Archive](downloads.md#ftp-archive) for exporting large amounts of data. ## Step-by-step walkthrough Our [Current Protocols in Bioinformatics article](https://currentprotocols.onlinelibrary.wiley.com/doi/full/10.1002/cpbi.104) describes different ways of accessing the data, including a walkthrough of the text search. (ebi-search)= ## Searching programmatically RNAcentral search is powered by [EBI Search](https://www.ebi.ac.uk/ebisearch/), which provides a public REST interface to the same index under the `rnacentral` domain. The website adjusts each query before sending it to EBI Search, so queries sent to the REST interface directly need a few changes: - write `AND`, `OR`, `NOT` and the `TO` in length ranges in upper case; - write `taxonomy`, `pubmed` and `doi` in upper case, as `TAXONOMY:"9606"`; - use `tax_string` in place of `species`; - add wildcards yourself, as `HOTAIR*`. *Example*: [human piRNAs as JSON](https://www.ebi.ac.uk/ebisearch/ws/rest/rnacentral?query=rna_type:%22pirna%22%20AND%20TAXONOMY:%229606%22&format=json), using the query `rna_type:"pirna" AND TAXONOMY:"9606"`. Related pages: - [Sequence search](sequence-search.md) - [REST API](api.md)