POST /api/genbank/sequences/search
Price: 20 credits
Search GenBank and RefSeq nucleotide records by query and filters
Searches NCBI's nuccore nucleotide corpus. A plain word with no field filter matches anywhere in the record, so anchor it: pass `organism`, `gene` or `definition` rather than putting the word in `term`. A misspelt bracket tag inside `term` is not rejected - it falls through to a free-text match and quietly widens the result set, so prefer the structured fields. `divisions` is GenBank's own filing category and is not a taxonomy: environmental, patent and EST records are divisions of their own rather than members of the organism division they came from. Records carry no nucleotide letters here - fetch one by accession from /genbank/sequences to get those.
access-token string requiredtimeout integer — Max scrapping execution timeout (in seconds) (default: 300; min: 20; max: 1500)term string nullable — Free-text query in Entrez syntax. Supports bracketed field tags (BRCA1[Gene Name], human[Organism], complete genome[Title]), boolean AND/OR/NOT and year ranges (2018:2022[PDAT]). Combined with AND against every structured filter below (examples: "BRCA1 AND human", "SARS-CoV-2 complete genome")count integer required — Number of sequence records to return (min: 1; max: 5000)offset integer — How many matches to skip before the returned page, for walking past a single call's ceiling (default: 0; min: 0; max: 100000)organism string nullable — Filter by source organism, scientific or common name (examples: "Homo sapiens", "human")gene string nullable — Filter by gene name or symbol (examples: "BRCA1", "rpoB")accession string nullable — Filter by nucleotide accession (examples: "NM_007300", "NC_002695")definition string nullable — Filter by words in the record definition line, which is what nuccore calls a record title (examples: "complete genome")author string nullable — Filter by an author of the submitting publication (examples: "Smith J")journal string nullable — Filter by the journal of the submitting publication (examples: "Nature")strain string nullable — Filter by source strain (examples: "K-12")isolate string nullable — Filter by source isolate (examples: "NA12878")bioproject string nullable — Filter by the BioProject the records belong to (examples: "PRJNA31257")biosample string nullable — Filter by the BioSample the records were derived from (examples: "SAMN00000002")assembly string nullable — Filter by the genome assembly the records belong to (examples: "GCF_000001405.40")feature_key string nullable — Filter by an annotated feature key present on the record (examples: "CDS")divisions array nullable — Filter by GenBank taxonomic or sequence division (any-of) (one of: "primate", "rodent", "other_mammal", "other_vertebrate", "invertebrate", "plant_fungal", "bacterial", "viral", "phage", "synthetic", "unannotated", "expressed_sequence_tag", "patent", "sequence_tagged_site", "genome_survey_sequence", "high_throughput_genomic", "high_throughput_cdna", "environmental_sample", "contig")biomolecules array nullable — Filter by the kind of molecule the record represents (any-of) (one of: "genomic", "mrna", "rrna", "trna", "ncrna", "crna", "transcribed_rna", "genomic_mrna", "snrna", "snorna", "other")source_databases array nullable — Filter by the database the record originates from, and for RefSeq by its curation status (any-of) (one of: "refseq", "genbank", "ddbj", "embl", "pdb", "refseq_reviewed", "refseq_validated", "refseq_provisional", "refseq_predicted", "refseq_model", "refseq_inferred")min_length integer nullable — Smallest sequence length to return, in bases (examples: 1000; min: 1)max_length integer nullable — Largest sequence length to return, in bases (examples: 5000; min: 1)mindate string nullable — Start of the date range (YYYY, YYYY/MM or YYYY/MM/DD); used with maxdate (examples: "2024")maxdate string nullable — End of the date range (YYYY, YYYY/MM or YYYY/MM/DD); used with mindate (examples: "2024")datetype string — Which date the range applies to (default: "pdat"; one of: "pdat", "mdat")sort string — Result ordering (default: "relevance"; one of: "relevance", "date_released", "date_modified", "organism_name", "accession")@type string (default: "GenbankSequence")id string requiredaccession string (default: "")gi string (default: "")definition string (default: "")organism string (default: "")taxid string (default: "")sequence_length integer nullablemolecule_type string (default: "")strandedness string (default: "")biomolecule string (default: "")topology string (default: "")completeness string (default: "")genome string (default: "")genetic_code string (default: "")source_database string (default: "")sequencing_technique string (default: "")strain string (default: "")biosample_accession string (default: "")bioproject_id string (default: "")assembly_accession string (default: "")assembly_gi string (default: "")qualifiers array (default: [])@type string (default: "GenbankSequenceQualifier")name string requiredvalue string requiredis_indexed boolean (default: false)created_date string (default: "")updated_date string (default: "")sequence string (default: "")url string (default: "")422 — The request body did not validate Check the fields against this schema. A URN with the wrong prefix is the most common cause.408 — The request ran past its time limit Raise `timeout` in the request body, up to the maximum this endpoint documents. Lowering `count` or turning off the `with_*` flags also helps, because less work finishes sooner.412 — The entity was not found, or a precondition failed Retrying will not help: either the entity does not exist, or the input points at a different one.429 — Too many requests: a rate limit or a usage window is exhausted When the response carries an X-Retry-After header, wait that many seconds and retry: the same number is in the body as `detail.retry_after`, and the limit clears once that window passes. The message in the body names the limit that was hit.500 — Something broke on our side Retrying will not help. If it keeps happening, send us the X-Request-ID from the response headers.529 — Rate limit reached, or the endpoint is overloaded Wait at least 30 seconds, then retry.X-Error — Error message text (present only on error)X-Request-ID — Unique request identifierX-Execution-Time — Execution time in secondsX-Result-Count — How many records the body carries. 0 means an empty result, which is a normal answer and not by itself an error. A non-zero count can come back together with X-Error when the failure happened partway through — read this header and X-Error independently.X-Total-Available-Results — How many records exist for this query, when the endpoint can say. On a `dry_run` request this is the answer and the body is empty. It saturates: the endpoint's documented maximum means 'at least that many', any smaller number is exact.X-Warning — Present when the request body carried keys this endpoint does not document. They were ignored, so any filter you meant to apply through them did not apply. Check the spelling against this schema and retry.X-Retry-After — Seconds to wait before retrying. Present only on 429.