STRING has an application programming interface (API) which enables you to get the data without using the graphical user interface of the web page. The API is convenient if you need to programmatically access some information but still do not want to download the entire dataset. There are several scenarios when it is practical to use it. For example, you might need to access some interaction from your own scripts or want to incorporate some information in STRING to a web page.
We currently provide an implementation using HTTP, where the database information is accessed by HTTP requests. Due to implementation and licensing reasons, The API provide methods to query individual items only, similar to the web site. If you need access to bulk data, you can download the entire dataset by signing the academic license agreement.
http://[database]/[access]/[format]/[request]?[parameter]=[value]Possible values for the fields are listed below in tables 3.1-3.5. Note that only some of the combinations of the fields are possible as shown on this diagram:
As an identifier, it is possible to use either a
single entry or a list of entries. The parameter is then called
respectively. In the former case, the
request should be
followed by the required parameter
and its value. In the latter case, when there are several entries, the
request should be ending with
...List and have the required parameter
The values of the identifiers parameter contains a list of items
separated by new line characters (
It is also possible to use a single item in list of identifies, for most cases this will be identical to the single item queries mentioned above.
Table 6.1. List of databases
| ||Main entry point of STRING|
|Alternative entry point of STRING|
|The sister database of STRING|
Table 6.2. List of accesses
|Application programming interface|
| ||Other services to access data|
Table 6.3. List of formats
|JSON format either as a list of hashes/dictionaries, or as a plain list (if there is only one value to be returned per record)|
|Tab separated values, with a header line|
|Tab separated values, without header line|
|The interaction network in PSI-MI 2.5 XML format|
|Tab-delimited form of PSI-MI (similar to tsv, modeled after the IntAct specification. (Easier to parse, but contains less information than the XML format.)|
|The network image|
Table 6.4. List of requests
|List of items that match (in name or identifier) the query item|
|List of items that match (in name or identifier) the query items|
|List of abstracts that contain the query item|
|List of abstracts that contain any of the query items|
|List of interaction partners for the query item|
|List of interaction partners for any of the query items|
|Action partners for the query item|
|Action partners for any of the query items|
|Interaction network in PSI-MI 2.5 format or PSI-MI-TAB format (similar to tsv)|
|Interaction network as above, but for a list of identifiers|
|The network image for the query item|
|The network image for the query items|
Table 6.5. List of parameters and values
|required parameter for single item, e.g. |
|required parameter for multiple items, e.g.|
|For resolve requests: |
|Taxon identifiers (e.g. Human 9606, see: http://www.uniprot.org/taxonomy)|
|Maximum number of nodes to return, e.g 10.|
|Threshold of significance to include a interaction, a number between 0 and 1000|
|Number of additional nodes in network (ordered by score), e.g./ 10|
|The style of edges in the network. evidence for colored multilines. confidence for singled lines where hue correspond to confidence score. (actions for stitch only)|
|Your identifier for us.|
http://string-db.org/api/tsv/resolve?identifier=ADD&species=9606Returns bare IDs that you could pipe into other STRING API-functions:
http://string-db.org/api/tsv-no-header/resolve?identifier=YOL086C&format=only-idsMaximum 10 PMID (default setting for
limit) for that contain any of that identifiers.
http://string-db.org/api/tsv/abstractsList ?identifiers=4932.YML115C%0D4932.YJR075W%0D4932.YEL036CTo get the 20 highest scoring interactors above score 400 for a list of queries.
http://string-db.org/api/tsv-no-header/interactorsList ?identifiers=4932.YML115C%0D4932.YJR075W%0D4932.YEL036C &required_score=400&limit=20The interactions above score 900 for a list of queries and limit to 5 nodes (i.e. max 5.6/2=15 interactions).
http://string-db.org/api/psi-mi-tab/interactionsList ?identifiers=4932.YML115C%0D4932.YJR075W%0D4932.YEL036C &required_score=900The network of a known identifier, with a score threshold of 950, limited to 10 interacting protein, and a evidence style of the edges.
http://string-db.org/api/image/network?identifier=4932.YML115C &required_score=950&limit=10 &network_flavor=evidence
As mentioned above, if you need to do large-scale analysis, please download full data set. Otherwise you may flood the string server with api requests, in particular if you run scripts in parallel.
The format of the API will stay constant with upcoming versions of STRING, but it is likely that add more query options later for retrieving information. For example: What are the synonyms of this item? To which orthologous group does this protein belong? etc.
caller_identity parameter can be used for
identifying you call to STRING. We can provide logging information according
to such information. Please contact the string team if you have particular needs.