跳到正文

医学公开数据库查询与登记

使用有明确接口的公开数据库查询方法保存请求、筛选、分页与来源,可用于医学文献、临床试验及药物资料检索。

开源精选医疗业务86 个文件50,135 Stars浏览次数 0K-Dense-AI/scientific-agent-skills MIT版本 a1043ef
开始使用

下载前阅读 SKILL.md 中的使用条件,并确认所用工具支持对应能力。

输入资料
指定数据库和查询问题 实际接口、筛选条件及使用范围 阅读本节完整说明
交付内容
可复查的查询资料 请求、分页与来源记录 阅读本节完整说明
  1. 获取完整包,保留配套文件的目录结构。
  2. 按照原文准备所需工具、依赖与输入资料。
  3. 阅读对应使用步骤与输入输出说明,在自己的环境中验证结果。

使用提示摘自原文,配套文件保留来源版本;实际运行条件以各包说明为准。

正文

获取原文件

references/string.md

Base URL

https://string-db.org/api

URL Pattern

/api/{output_format}/{method}
  • output_format: json, tsv, tsv-no-header, image, svg (not all formats for all endpoints)
  • method: endpoint name (see below)

Authentication

No API key required. All endpoints are public.

Key Endpoints

1. Resolve protein identifiers

Map protein names/identifiers to STRING internal IDs. Always do this first to get canonical STRING IDs.

GET /api/json/get_string_ids?identifiers={query}&species={taxid}
Parameter Type Description
identifier string Required. Protein name, gene symbol, or external ID.
species int NCBI taxonomy ID (9606 = human, 10090 = mouse). Recommended to avoid ambiguity.

Example:

https://string-db.org/api/json/get_string_ids?identifiers=TP53&species=9606

Response:

[
  {
    "stringId": "9606.ENSP00000269305",
    "preferredName": "TP53",
    "ncbiTaxonId": 9606,
    "taxonName": "Homo sapiens",
    "annotation": "Cellular tumor antigen p53; ..."
  }
]

2. Get interaction partners (network)

GET /api/json/interaction_partners?identifiers={proteins}&species={taxid}
Parameter Type Description
identifiers string Required. Protein name(s). Use %0d (newline) to separate multiple.
species int NCBI taxonomy ID.
limit int Max number of interaction partners to return (per input protein).
required_score int Minimum combined score (0-1000). Default: 400. Common thresholds: 400 (medium), 700 (high), 900 (highest).
network_type string functional (default, all associations) or physical (predicted physical associations, which need not prove direct binding).

Example:

https://string-db.org/api/json/interaction_partners?identifiers=TP53&species=9606&limit=10&required_score=900

Response:

[
  {
    "stringId_A": "9606.ENSP00000269305",
    "stringId_B": "9606.ENSP00000261842",
    "preferredName_A": "TP53",
    "preferredName_B": "MDM2",
    "ncbiTaxonId": 9606,
    "score": 0.999,
    "nscore": 0,
    "fscore": 0,
    "pscore": 0,
    "ascore": 0.93,
    "escore": 0.994,
    "dscore": 0.9,
    "tscore": 0.981
  }
]

Score channels: nscore (neighborhood), fscore (fusion), pscore (phylogenetic co-occurrence), ascore (co-expression), escore (experimental), dscore (database/curated), tscore (text mining).


3. Get network interactions between a set of proteins

GET /api/json/network?identifiers={proteins}&species={taxid}
Parameter Type Description
identifiers string Required. Protein names separated by %0d (newline-encoded).
species int NCBI taxonomy ID.
required_score int Minimum combined score (0-1000).
network_type string functional or physical.
add_nodes int Number of additional interactors to add (expands the network).

Example — network among a set of proteins:

https://string-db.org/api/json/network?identifiers=TP53%0dBRCA1%0dATM%0dCHEK2%0dMDM2&species=9606&required_score=700

Returns all pairwise interactions among the input set.


4. Network image

GET /api/image/network?identifiers={proteins}&species={taxid}
GET /api/svg/network?identifiers={proteins}&species={taxid}

Returns a PNG image or SVG of the interaction network.

Example:

https://string-db.org/api/image/network?identifiers=TP53%0dBRCA1%0dMDM2&species=9606

5. Functional enrichment analysis

Perform Gene Ontology, KEGG pathway, and other enrichment analysis on a set of proteins.

GET /api/json/enrichment?identifiers={proteins}&species={taxid}
Parameter Type Description
identifiers string Required. Newline-separated (%0d) protein names.
species int NCBI taxonomy ID.

Example:

https://string-db.org/api/json/enrichment?identifiers=TP53%0dBRCA1%0dATM%0dCHEK2%0dCDK2%0dCDKN1A&species=9606

Response:

[
  {
    "category": "Process",
    "term": "GO:0006974",
    "description": "cellular response to DNA damage stimulus",
    "number_of_genes": 6,
    "number_of_genes_in_background": 781,
    "ncbiTaxonId": 9606,
    "inputGenes": "TP53,BRCA1,ATM,CHEK2,CDK2,CDKN1A",
    "preferredNames": "TP53,BRCA1,ATM,CHEK2,CDK2,CDKN1A",
    "p_value": 1.2e-12,
    "fdr": 5.6e-10
  }
]

Categories include: Process (GO Biological Process), Function (GO Molecular Function), Component (GO Cellular Component), KEGG, Pfam, InterPro, SMART, Keyword (UniProt), Reactome, WikiPathways, HPO (Human Phenotype Ontology).


6. Get protein annotations/info

GET /api/json/get_string_ids?identifiers={proteins}&species={taxid}

Maps arbitrary names to STRING IDs with annotation text.

Example:

https://string-db.org/api/json/get_string_ids?identifiers=CDK2%0dp53&species=9606

Response:

[
  {
    "queryIndex": 0,
    "queryItem": "CDK2",
    "stringId": "9606.ENSP00000266970",
    "ncbiTaxonId": 9606,
    "taxonName": "Homo sapiens",
    "preferredName": "CDK2",
    "annotation": "Cyclin-dependent kinase 2; ..."
  }
]

7. Get homology / best-hit in another species

GET /api/json/homology_best?identifiers={proteins}&species={taxid}&species_b={taxid_b}
Parameter Type Description
identifiers string Source protein(s).
species int Source species.
species_b int Target species for homolog lookup.

Example:

https://string-db.org/api/json/homology_best?identifiers=TP53&species=9606&species_b=10090

8. PPI enrichment (is my set more connected than expected?)

GET /api/json/ppi_enrichment?identifiers={proteins}&species={taxid}

Example:

https://string-db.org/api/json/ppi_enrichment?identifiers=TP53%0dBRCA1%0dATM%0dCHEK2&species=9606

Response:

[
  {
    "number_of_nodes": 4,
    "number_of_edges": 6,
    "average_node_degree": 3.0,
    "local_clustering_coefficient": 1.0,
    "expected_number_of_edges": 1,
    "p_value": 0.000123
  }
]

Common Species Taxonomy IDs

Species Taxon ID
Homo sapiens (human) 9606
Mus musculus (mouse) 10090
Rattus norvegicus (rat) 10116
Drosophila melanogaster (fruit fly) 7227
Saccharomyces cerevisiae (yeast) 4932
Caenorhabditis elegans (worm) 6239
Danio rerio (zebrafish) 7955
Escherichia coli K12 511145
Arabidopsis thaliana 3702

Rate Limits

  • No published hard rate limit, but the API is intended for programmatic access at moderate rates.
  • Recommended: max 1 request per second.
  • For large-scale data downloads, use the flat-file downloads on the STRING website instead.
  • If you send too many requests, you may receive HTTP 429 or temporary blocking.
  • Multiple identifiers per request is strongly preferred over multiple single-identifier requests.

Error Handling

  • Returns HTTP 400 for malformed requests.
  • Returns HTTP 404 if no matching protein is found.
  • Empty JSON array [] if the query is valid but returns no results (e.g., no interactions above the threshold).
  • Include species parameter whenever possible to avoid ambiguous identifier resolution.

Current STRING API contract also supports regulatory networks. Pin the returned STRING version and network type; best sequence similarity does not by itself establish orthology.

CONTACT HAONAN

联系haonan

医疗 AI · 产品与独立开发

刘浩南

关注医疗 AI 从 demo 到真实落地,聚焦产品化、商业化与院内工作流效率提升。

12年医疗产研经验,大湾区头部医疗AI公司前产品总监,独立开发者

医疗 AI 产品化医疗 AI 商业化院内工作流效率
刘浩南的微信联系二维码
微信扫一扫,联系 haonan