bio-entrez-search
Search NCBI databases using Biopython's Entrez module (ESearch, EInfo, EGQuery utilities).
Install / Use
npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-entrez-searchInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Data & AnalyticsSupported Platforms
Our assessment of bio-entrez-search
bio-entrez-search scores 86/100 on our quality scale, 430th of 604 Data & Analytics skills we index.
Its SKILL.md is 8.9 KB long, well organised into 41 sections with 17 code examples: a thorough specification that gives an agent plenty to work with.
With 3,034 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- Our last check on 2026-11-03 found the source still online.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 86/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-10-01. Automated pattern scan on 2026-09-30. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
bio-entrez-search compared with similar skills
All 4 of these similar skills score higher than bio-entrez-search; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| bio-entrez-search (this skill)by FreedomIntelligence | 86 | 3.0k | 4mo ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 112.3k | 8d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 79.8k | today | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 103.6k | 2d ago | MCP Server |
| crawl4aiby unclecode | 100 | 87.4k | 3d ago | MCP Server |
Frequently asked questions
- How do I install bio-entrez-search?
- Run
npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-entrez-search. The install tabs above show the steps for each supported agent. - Which AI agents does bio-entrez-search work with?
- It is written for Zed, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is bio-entrez-search safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 86/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is bio-entrez-search still maintained?
- The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
Skill content
View source on GitHubname: bio-entrez-search description: Search NCBI databases using Biopython Bio.Entrez. Use when finding records by keyword, building complex search queries, discovering database structure, or getting global query counts across databases. tool_type: python primary_tool: Bio.Entrez measurable_outcome: Execute skill workflow successfully with valid output within 15 minutes. allowed-tools:
- read_file
- run_shell_command
Entrez Search
Search NCBI databases using Biopython's Entrez module (ESearch, EInfo, EGQuery utilities).
Required Setup
from Bio import Entrez
Entrez.email = 'your.email@example.com' # Required by NCBI
Entrez.api_key = 'your_api_key' # Optional, raises rate limit 3->10 req/sec
Core Functions
Entrez.esearch() - Search a Database
Search any NCBI database and get matching record IDs.
handle = Entrez.esearch(db='nucleotide', term='human[orgn] AND BRCA1[gene]')
record = Entrez.read(handle)
handle.close()
print(f"Found {record['Count']} records")
print(f"IDs: {record['IdList']}") # First 20 IDs by default
Key Parameters:
| Parameter | Description | Default |
|-----------|-------------|---------|
| db | Database to search | Required |
| term | Search query | Required |
| retmax | Max IDs to return | 20 |
| retstart | Starting index (pagination) | 0 |
| usehistory | Store results on server | 'n' |
| sort | Sort order | database-specific |
| datetype | Date field to search | 'pdat' |
| reldate | Records from last N days | None |
| mindate | Start date (YYYY/MM/DD) | None |
| maxdate | End date (YYYY/MM/DD) | None |
ESearch Result Fields:
record['Count'] # Total matching records (string)
record['IdList'] # List of record IDs
record['RetMax'] # Number of IDs returned
record['RetStart'] # Starting index
record['QueryKey'] # For history server (if usehistory='y')
record['WebEnv'] # For history server (if usehistory='y')
record['TranslationSet'] # Query translations applied
record['QueryTranslation'] # Final translated query
Entrez.einfo() - Database Information
Get information about available databases or specific database fields.
# List all available databases
handle = Entrez.einfo()
record = Entrez.read(handle)
handle.close()
print(record['DbList']) # ['pubmed', 'protein', 'nucleotide', ...]
# Get info about specific database
handle = Entrez.einfo(db='nucleotide')
record = Entrez.read(handle)
handle.close()
print(f"Description: {record['DbInfo']['Description']}")
print(f"Record count: {record['DbInfo']['Count']}")
# List searchable fields
for field in record['DbInfo']['FieldList']:
print(f"{field['Name']}: {field['Description']}")
Database Info Fields:
record['DbInfo']['DbName'] # Database name
record['DbInfo']['Description'] # Database description
record['DbInfo']['Count'] # Total records in database
record['DbInfo']['LastUpdate'] # Last update date
record['DbInfo']['FieldList'] # Searchable fields
record['DbInfo']['LinkList'] # Available links to other databases
Entrez.egquery() - Global Query
Search across all NCBI databases simultaneously.
handle = Entrez.egquery(term='CRISPR')
record = Entrez.read(handle)
handle.close()
for result in record['eGQueryResult']:
if int(result['Count']) > 0:
print(f"{result['DbName']}: {result['Count']} records")
Search Query Syntax
NCBI uses a specific query syntax:
Field Tags
# Search specific fields using [field_name]
term = 'BRCA1[gene]' # Gene name field
term = 'human[orgn]' # Organism field
term = 'Homo sapiens[ORGN]' # Full organism name
term = 'NM_007294[accn]' # Accession number
term = 'Smith J[auth]' # Author (PubMed)
term = 'Nature[jour]' # Journal (PubMed)
term = '1000:5000[slen]' # Sequence length range
term = 'mRNA[fkey]' # Feature key
Boolean Operators
term = 'BRCA1 AND human' # Both terms
term = 'cancer OR tumor' # Either term
term = 'human NOT mouse' # Exclude term
term = '(BRCA1 OR BRCA2) AND human' # Grouping
Date Ranges
# Using date parameters
handle = Entrez.esearch(
db='pubmed',
term='CRISPR',
datetype='pdat', # Publication date
mindate='2023/01/01',
maxdate='2024/12/31'
)
# Or in query string
term = 'CRISPR AND 2024[pdat]'
term = 'CRISPR AND 2023:2024[pdat]'
Wildcards and Phrases
term = 'immun*' # Wildcard
term = '"breast cancer"[title]' # Exact phrase
Common Databases
| Database | db value | Common Fields |
|----------|------------|---------------|
| PubMed | pubmed | [auth], [title], [jour], [pdat] |
| Nucleotide | nucleotide | [orgn], [gene], [accn], [slen] |
| Protein | protein | [orgn], [gene], [accn], [molwt] |
| Gene | gene | [orgn], [sym], [chr] |
| SRA | sra | [orgn], [platform], [strategy] |
| Taxonomy | taxonomy | [scin], [comn], [rank] |
| Assembly | assembly | [orgn], [level], [refseq] |
Code Patterns
Basic Search with Pagination
from Bio import Entrez
Entrez.email = 'your.email@example.com'
def search_ncbi(db, term, max_results=100):
handle = Entrez.esearch(db=db, term=term, retmax=max_results)
record = Entrez.read(handle)
handle.close()
return record['IdList'], int(record['Count'])
ids, total = search_ncbi('nucleotide', 'human[orgn] AND insulin[gene]')
print(f'Retrieved {len(ids)} of {total} total records')
Paginated Search for Large Results
def search_all_ids(db, term, batch_size=10000):
all_ids = []
handle = Entrez.esearch(db=db, term=term, retmax=0)
record = Entrez.read(handle)
handle.close()
total = int(record['Count'])
for start in range(0, total, batch_size):
handle = Entrez.esearch(db=db, term=term, retstart=start, retmax=batch_size)
record = Entrez.read(handle)
handle.close()
all_ids.extend(record['IdList'])
return all_ids
Search with History Server (for Large Results)
# Store results on NCBI server for subsequent fetching
handle = Entrez.esearch(db='nucleotide', term='human[orgn] AND mRNA[fkey]', usehistory='y')
record = Entrez.read(handle)
handle.close()
webenv = record['WebEnv']
query_key = record['QueryKey']
total = int(record['Count'])
# Use webenv and query_key with efetch for batch downloads
# See batch-downloads skill for details
Recent Records Only
# Records from last 30 days
handle = Entrez.esearch(db='pubmed', term='CRISPR', reldate=30, datetype='pdat')
record = Entrez.read(handle)
handle.close()
Get Available Fields for a Database
def get_search_fields(db):
handle = Entrez.einfo(db=db)
record = Entrez.read(handle)
handle.close()
return [(f['Name'], f['Description']) for f in record['DbInfo']['FieldList']]
fields = get_search_fields('nucleotide')
for name, desc in fields[:10]:
print(f'{name}: {desc}')
Check Query Translation
handle = Entrez.esearch(db='nucleotide', term='human BRCA1')
record = Entrez.read(handle)
handle.close()
# See how NCBI interpreted your query
print(f"Your query was translated to: {record['QueryTranslation']}")
# e.g., '"homo sapiens"[Organism] AND BRCA1[All Fields]'
Common Errors
| Error | Cause | Solution |
|-------|-------|----------|
| HTTPError 429 | Rate limit exceeded | Add delays or use API key |
| HTTPError 400 | Invalid query syntax | Check field names and operators |
| Empty IdList | No matches or typo | Check QueryTranslation field |
| RuntimeError | Missing email | Set Entrez.email |
Decision Tree
Need to search NCBI?
├── Finding records in one database?
│ └── Use Entrez.esearch()
├── Search across all databases?
│ └── Use Entrez.egquery()
├── Need database field names?
│ └── Use Entrez.einfo(db='database')
├── List all available databases?
│ └── Use Entrez.einfo() (no db argument)
├── Results > 10,000 records?
│ └── Use usehistory='y', then batch fetch
└── Need to fetch actual records?
└── See entrez-fetch skill
Related Skills
- entrez-fetch - Retrieve full records after searching
- entrez-link - Find related records in other databases
- batch-downloads - Download large result sets efficiently
- geo-data - Search GEO expression datasets (specialized search)
- blast-searches - Search by sequence similarity instead of keywords
Related Skills
Agent-Reach
112.3kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
79.8kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Scrapling
103.6k🕷️ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
crawl4ai
87.4kOfficial Crawl4AI Cloud: a hosted web scraping, extraction, and search API for AI agents. Free API key, 1,000 credits a month, no card. Fully open source: this repo is the Apache-2.0 crawler that powers it, and you can self-host it.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
