Discover/Nih API
live

Nih APIblast.ncbi.nlm.nih.gov

Submit DNA and protein sequences to NCBI BLAST and retrieve structured JSON alignment results. Supports blastn, blastp, blastx, tblastn, and tblastx.

Endpoint health
verified 3d ago
submit_blast
check_status
get_results
search_blast
4/4 passing latest checkself-healing
Endpoints
4
Updated
21d ago

What is the Nih API?

This API exposes 4 endpoints for running sequence similarity searches against NCBI's biological databases and retrieving structured alignment results. Use submit_blast to queue a job and get a Request ID, check_status to poll its progress, and get_results to fetch the final BlastOutput2 alignment report — or use search_blast to handle all three steps in a single blocking call.

Try it
Nucleotide or protein sequence to search (raw sequence or FASTA format).
BLAST program to use.
Target database. Common values: nt (nucleotide collection), nr (non-redundant protein). If omitted, defaults to nt for blastn or nr for other programs.
NCBI genetic code number for translation (used by blastx/tblastx). Standard code is 1.
api.parse.bot/scraper/1393a460-4f8b-4db5-8c26-8ad893041880/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X POST 'https://api.parse.bot/scraper/1393a460-4f8b-4db5-8c26-8ad893041880/submit_blast' \
  -H 'X-API-Key: $PARSE_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "query": "ATGATGATGATGATGATG",
  "program": "blastn",
  "database": "nt",
  "genetic_code": "1"
}'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace blast-ncbi-nlm-nih-gov-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Walkthrough: NCBI BLAST API — submit jobs, check status, retrieve results."""
from parse_apis.ncbi_blast_api import Blast, BlastProgram, JobNotFound

client = Blast()

# Submit a nucleotide BLAST job and get the tracking RID back immediately.
job = client.jobs.submit(query="ATGATGATGATGATGATG", program=BlastProgram.BLASTN, database="nt")
print(f"Submitted job: RID={job.rid}, estimated wait={job.rtoe}s")

# Check the job's processing status (WAITING, SEARCHING, READY, FAILED, UNKNOWN).
job_status = job.status()
print(f"Job status: {job_status.status}")

# Once READY, retrieve the full alignment results.
try:
    result = job.results()
    for report in result.BlastOutput2:
        print(f"Program: {report.program}, Version: {report.version}")
except JobNotFound as exc:
    print(f"Job not found: {exc.rid}")

# Or use search() for a single blocking call that submits + polls + returns results.
result = client.jobs.search(query="GCTAGCTAGCTAGCTAGCTA", program=BlastProgram.BLASTN, database="nt")
for report in result.BlastOutput2:
    print(f"Search result — program: {report.program}, version: {report.version}")

print("Exercised: jobs.submit / job.status / job.results / jobs.search")
All endpoints · 4 totalmissing one? ·

Submit a BLAST job to NCBI and receive a Request ID (RID) for tracking. The RID can be used with check_status and get_results endpoints to monitor and retrieve results. Returns immediately with the RID and an estimated time of execution (RTOE) in seconds.

Input
ParamTypeDescription
queryrequiredstringNucleotide or protein sequence to search (raw sequence or FASTA format).
programstringBLAST program to use.
databasestringTarget database. Common values: nt (nucleotide collection), nr (non-redundant protein). If omitted, defaults to nt for blastn or nr for other programs.
genetic_codestringNCBI genetic code number for translation (used by blastx/tblastx). Standard code is 1.
Response
{
  "type": "object",
  "fields": {
    "rid": "string, the Request ID for tracking this BLAST job",
    "rtoe": "integer, estimated time of execution in seconds"
  },
  "sample": {
    "data": {
      "rid": "2M9SBYDG014",
      "rtoe": 30
    },
    "status": "success"
  }
}

About the Nih API

Submitting and Tracking BLAST Jobs

The submit_blast endpoint accepts a nucleotide or protein sequence (raw or FASTA format) along with three optional parameters: program (blastn, blastp, blastx, tblastn, or tblastx), database (e.g. nt for nucleotide or nr for protein), and genetic_code for translation-based searches like blastx or tblastx. The response returns an rid (Request ID) and an rtoe integer estimating how many seconds the job will take. The RID is then passed to check_status, which returns one of five status strings: WAITING, SEARCHING, READY, FAILED, or UNKNOWN.

Retrieving Alignment Results

Once check_status returns READY, get_results accepts the same rid and returns the full BLAST report as a BlastOutput2 array. Each element in the array contains the program name, search parameters, and a nested structure of hits with alignment statistics. If the job is still processing when get_results is called, the response returns an upstream_error with HTTP status 202.

Single-Call Search with search_blast

The search_blast endpoint accepts the same inputs as submit_blast but internally handles polling and returns the completed BlastOutput2 result directly. Because BLAST jobs can take anywhere from a few seconds to several minutes depending on sequence length, database size, and NCBI server load, this endpoint may have a long response time. It is best suited for synchronous workflows where a single blocking call is acceptable.

Database and Program Selection

If database is omitted, the API defaults to nt when program is blastn and to nr for protein-mode programs. The genetic_code parameter is relevant only when the query sequence requires translation (blastx, tblastx) and corresponds to standard NCBI genetic code table numbers.

Reliability & maintenanceVerified

The Nih API is a managed, monitored endpoint for blast.ncbi.nlm.nih.gov — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when blast.ncbi.nlm.nih.gov changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official blast.ncbi.nlm.nih.gov API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
3d ago
Latest check
4/4 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Identify the species of an unknown DNA sample by running blastn against the nt database and inspecting hits in BlastOutput2
  • Find functionally similar proteins across organisms by submitting an amino acid sequence to blastp against nr
  • Translate and search a nucleotide query against a protein database using blastx to find coding regions
  • Automate genomic pipeline steps by polling check_status and fetching results with get_results only when status is READY
  • Batch-process multiple sequences by submitting them via submit_blast, storing RIDs, and retrieving results asynchronously
  • Validate synthetic gene sequences against public databases to detect unintended homology before synthesis
  • Support phylogenetic research by collecting alignment statistics and hit descriptions from BlastOutput2 for downstream analysis
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does NCBI provide an official developer API for BLAST?+
Yes. NCBI offers the BLAST URL API, documented at https://ncbi.github.io/blast-cloud/dev/api.html. It accepts HTTP requests and returns results in several formats. This Parse API wraps those capabilities into structured JSON endpoints.
What does the BlastOutput2 response contain?+
BlastOutput2 is an array of report objects. Each report includes the BLAST program used, the search parameters applied, and a list of hits. Each hit contains the subject sequence description, accession, alignment statistics (scores, e-values, identity percentages), and aligned sequence segments (HSPs). The exact nesting follows the NCBI BLAST JSON schema.
Can I retrieve results for a job that has not yet reached READY status?+
No. Calling get_results on a job that is still processing returns an upstream_error response with status 202. You should call check_status first and only call get_results when the returned status is READY. The search_blast endpoint handles this polling loop automatically.
Does the API support filtering results by e-value threshold or maximum number of hits before they are returned?+
The current endpoints do not expose BLAST scoring parameters such as e-value cutoffs, max_target_seqs, or word size. Results reflect NCBI's default search settings for the chosen program and database. You can fork this API on Parse and revise the submit_blast and search_blast endpoints to pass additional BLAST parameters and filter the BlastOutput2 response accordingly.
How long should I expect search_blast to take?+
Job duration depends on query length, the selected database, and current NCBI server load. Short queries against nt or nr typically complete in under a minute, but complex or long sequences can take several minutes. The rtoe value returned by submit_blast provides an initial estimate in seconds.
Page content last updated . Spec covers 4 endpoints from blast.ncbi.nlm.nih.gov.
Related APIs in HealthcareSee all →
ncbi.nlm.nih.gov API
Search and retrieve biomedical literature from NCBI databases including PubMed, PubMed Central, and MeSH. Supports full-text extraction, metadata lookup, and research filtering.
pubmed.ncbi.nlm.nih.gov API
Search and retrieve biomedical literature from PubMed and NCBI databases. Supports keyword search, advanced field-tag queries, clinical filters, citation matching, date filtering, publication type filtering, and direct E-utilities access.
pmc.ncbi.nlm.nih.gov API
Search millions of full-text biomedical research articles and access their metadata, citations, and related papers from PubMed Central. Find articles by topic, discover similar research, explore journal collections, and retrieve detailed citation information to support your literature review and research.
blinkhealth.com API
Find affordable medications by comparing prices across pharmacies, viewing available formulations, and locating nearby participating locations. Search drugs, discover generic alternatives, and check preferred drug lists to save money on prescriptions.
snpedia.com API
Search and retrieve detailed genetic information including SNPs, genotypes, genes, medical conditions, and medicines from SNPedia's human genetics database. Look up specific genetic variants, explore how different gene combinations affect health outcomes, and discover connections between genetic data and medical treatments.
clinicaltrials.gov API
Search and retrieve comprehensive information about clinical trials worldwide, including study details, eligibility criteria, locations, and outcomes data. Access structured metadata and statistics to find relevant research studies matching your specific medical conditions or research interests.
oeis.org API
Search OEIS for integer sequences by keyword, A-number, or known terms, then retrieve full sequence entries and b-file term data.
bd.com API
Access current recall notices and safety alerts from BD (Becton, Dickinson and Company), including affected product names, campaign identifiers, dates, status, and detailed clinical impact summaries with recommended actions.