BYTETOOLS

STRING API

Free STRING database API with no key: protein-protein interaction networks with per-evidence confidence scores for 12,000+ organisms. Tested curl example and live response included.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-21

What is the STRING API?

The STRING API is a free, key-free interface to the STRING protein-protein interaction database. Given a list of protein or gene identifiers it returns the interaction network between them, with a combined confidence score and a separate score for each independent line of evidence.

STRING aggregates known and predicted protein interactions across more than 12,000 organisms, and its central design decision is that it never gives you one number without showing its work. The `score` field is a combined confidence, but alongside it sit `escore` for experimental evidence, `dscore` for curated databases, `tscore` for text mining, `nscore` for genomic neighbourhood, `fscore` for gene fusion and `pscore` for phylogenetic co-occurrence. A pair with a high combined score driven entirely by `tscore` is a literature co-mention, not a measured interaction — a distinction that matters enormously and is invisible if you read only the headline number.

The API has two quirks worth knowing before you write any code. Identifiers in a multi-protein query are separated by `%0d` (a carriage return), not a comma, which trips up almost everyone the first time. And STRING asks that you resolve names through the `get_string_ids` endpoint before querying networks, because raw symbols are ambiguous — passing `species=9606` alongside them, as the example does, is the minimum defence against silently matching the wrong organism.

Quick facts

Base URL
https://string-db.org/api
Authentication
No API key. STRING asks that requests include a `caller_identity` parameter naming your application, and that you use the versioned host (such as version-12-0.string-db.org) if you need results to stay reproducible.
Rate limit
No hard limit published, but STRING asks for no more than one request per second and for bulk users to download the flat files instead.
Pricing
Free to use. STRING data is released under CC BY 4.0; check the STRING licensing page before redistributing the data itself as part of a commercial product.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the STRING API

Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.

1. Fetch the interaction network between TP53 and EGFR in human

GET https://string-db.org/api/json/network?identifiers=TP53%0dEGFR&species=9606

curl
curl 'https://string-db.org/api/json/network?identifiers=TP53%0dEGFR&species=9606'
JavaScript (fetch)
const res = await fetch("https://string-db.org/api/json/network?identifiers=TP53%0dEGFR&species=9606");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://string-db.org/api/json/network?identifiers=TP53%0dEGFR&species=9606", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
[
  {
    "stringId_A": "9606.ENSP00000269305",
    "stringId_B": "9606.ENSP00000275493",
    "preferredName_A": "TP53",
    "preferredName_B": "EGFR",
    "ncbiTaxonId": "9606",
    "score": 0.943,
    "nscore": 0,
    "fscore": 0,
    "pscore": 0,
    "ascore": 0,
    "escore": 0.329,
    "dscore": 0,
    "tscore": 0.919
  }
]

Parameters

ParameterTypeRequiredDescription
identifiersqueryRequiredProtein identifiers separated by `%0d`. Comma separation does not work. TP53%0dEGFR
speciesqueryOptionalNCBI taxon id. Strongly recommended — without it identifier matching is ambiguous. 9606
required_scorequeryOptionalMinimum combined score, 0-1000. STRING treats 400 as medium and 700 as high confidence. 700
network_typequeryOptional`functional` (default) includes indirect associations; `physical` restricts to evidence of a physical complex. physical
caller_identityqueryOptionalYour application name. STRING asks that every automated caller sends this. bytetools
add_nodesqueryOptionalExpand the network with this many additional high-confidence interactors. 10

Response fields

stringId_A / stringId_Bstring
STRING's internal protein identifiers, prefixed with the taxon id.
preferredName_A / preferredName_Bstring
Human-readable gene symbols for the two partners.
scorefloat
Combined confidence, 0-1. This is a probability that the association is real, not a measure of interaction strength.
escorefloat
Experimental evidence subscore, from interaction assays. The subscore to trust most for physical interactions.
dscorefloat
Curated database subscore, from sources such as Reactome and KEGG.
tscorefloat
Text-mining subscore, derived from co-mention in abstracts. High values alone are weak evidence.
nscore / fscore / pscorefloat
Genomic context subscores: neighbourhood, fusion and phylogenetic co-occurrence. Mostly relevant for bacteria.

What you can build with the STRING API

  • Render an interaction network around a gene of interest
  • Filter an interaction list down to experimentally supported edges only
  • Add first-degree neighbours to a hit list before enrichment analysis
  • Compare functional and physical networks for the same protein set
  • Cross-reference proteins to Ensembl protein identifiers

Common errors and how to fix them

Empty array

One or more identifiers failed to match, or nothing cleared the score threshold.

Fix: Resolve names through `get_string_ids` first and always send `species`. An unmatched identifier is silently dropped rather than reported.

400

Identifiers were comma-separated.

Fix: STRING separates identifiers with `%0d`. This is the most common first-time failure with the API.

Results change between runs

The unversioned host tracks the current release.

Fix: Query a versioned host such as `version-12-0.string-db.org` when you need reproducible output.

Throttled or blocked

Too many rapid requests, or no caller identity.

Fix: Keep to about one request per second and send `caller_identity` so STRING can contact you rather than blocking you.

STRING API — frequently asked questions

What does the STRING confidence score actually mean?

It is an estimated probability that the association is genuine, on a 0-1 scale, combining several independent evidence channels. It says nothing about binding affinity or biological importance — a score of 0.9 means STRING is confident the link is real, not that the interaction is strong.

Is a high STRING score enough evidence of a physical interaction?

No. A high combined score can come almost entirely from text mining, meaning the two proteins are frequently mentioned together in abstracts. Check `escore` and `dscore`, or query with `network_type=physical`, before claiming a physical interaction.

How do I pass more than one protein to the STRING API?

Join the identifiers with `%0d`, the URL-encoded carriage return. Commas are not accepted and will produce an empty or wrong result rather than an error.

Is STRING free to use commercially?

The service is free and the data is published under CC BY 4.0, but STRING maintains a separate licensing page for commercial redistribution. If you plan to ship STRING data inside a product rather than query it live, read that page first.

Tools that pair with this API

STRING is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.