# Protein Structure Evidence Resolver (`flintglade/protein-structure-evidence-resolver`) Actor

Resolve protein structure evidence across RCSB PDB, PDBe, AlphaFold DB, and UniProt with source provenance, conflicts, and downloadable artifacts.

- **URL**: https://apify.com/flintglade/protein-structure-evidence-resolver.md
- **Developed by:** [Flintglade](https://apify.com/flintglade) (community)
- **Categories:** Automation, Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $30.00 / 1,000 structure evidences

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Protein Structure Evidence Resolver

Resolve a public protein identifier to source-linked experimental PDB structures and existing AlphaFold DB models while keeping the two evidence classes separate.

### What this does not do

- No claim that one structure is universally best.
- No docking or drug recommendation.
- No clinical or diagnostic interpretation.
- No structure-file redistribution beyond source terms.
- No predicted/experimental conflation.
- No private sequence upload in v1.
- No structure prediction; the Actor only retrieves existing official records.

### Sources and authorization

The Actor makes bounded GET requests only to official RCSB PDB Search/Data and file services, official PDBe entry/mapping services, AlphaFold DB, and UniProt REST. It accepts identifiers, never user URLs. Metadata carries request locators, response hashes, and contract versions. Coordinate copying is opt-in and limited to official RCSB or AlphaFold DB mmCIF URLs under their published terms.

### Input

Each of 1-500 `targets` contains exactly one `uniprotId`, `pdbId`, or `alphaFoldId`. Experimental evidence, predicted evidence, ligand metadata, and coordinates can be independently controlled. `selectionCriteria` applies transparent filters and lexical ordering only.

```json
{
  "targets": [{"uniprotId": "P69905"}],
  "includeExperimental": true,
  "includePredicted": true,
  "includeLigands": true,
  "includeCoordinates": false,
  "concurrency": 1
}
````

### Output

One result row per processed target contains normalized mapping evidence, the exact UniProt sequence and SHA-256 when mapped, separate `experimentalStructures` and `predictedModels`, chains, assemblies, SIFTS-based sequence coverage and gaps, engineered/mutation indicators, observed ligands, experimental quality, AlphaFold confidence, conflicts, comparability, optional explicit selection, and source locators. A separate uncharged run-summary row reports counts and billing evidence.

Example shape:

```json
{
  "entityKey": "P69905",
  "status": "resolved",
  "experimentalStructures": [{"evidenceClass": "experimental", "pdbId": "4HHB"}],
  "predictedModels": [{"evidenceClass": "predicted", "alphaFoldId": "AF-P69905-F1"}],
  "comparability": "comparable",
  "selection": {"applied": false, "orderedIdentifiers": [], "statement": "No ranking or best-structure claim was applied."},
  "charge": {"event": "structure-evidence", "chargeable": true}
}
```

### Pricing

The exact primary event is `structure-evidence` at **$0.03 per target**. A 10-target run can charge at most 10 events, or $0.30, plus Apify platform usage. Resolved evidence, useful terminal no-evidence, ambiguity/conflict, and metadata-complete coordinate-partial results are chargeable. Invalid IDs, mapping invariant failures, rights blocks, source outages without a terminal result, internal errors, and cap stops are not.

### State and baseline behavior

The Actor is stateless. It does not read or commit baselines and does not mutate source records.

### Partial failures and negative results

Source outages are visible and uncharged when no terminal result can be established. A metadata result can remain chargeable when optional coordinates fail, with `partial_coordinates` and an explicit warning. Official terminal absence is a useful `no_evidence` result. Conflicting mappings are returned as evidence, never silently resolved.

### Resource and artifact limits

Launch memory is 256 MB minimum, 1024 MB default, and 2048 MB maximum; hosted timeout is 600 seconds. Concurrency is 1-8. JSON responses are capped at 4 MB and depth 40. At most 50 experimental structures are considered per target. Coordinates are capped at 3 artifacts per target, 5,000,000 bytes each, and 10,000,000 bytes total. KVS keys are generated, and every coordinate has content type, byte length, exact SHA-256, schema version, generation rule, and source URL in `ARTIFACT_MANIFEST.json`.

### Data handling, privacy, and deletion

Inputs contain public identifiers only. No credentials or private sequences are accepted. Results and requested coordinate artifacts remain in the caller's Apify storage and follow that storage's retention/deletion controls. See [PRIVACY.md](PRIVACY.md).

### Source rights and attribution

RCSB PDB and PDBe describe experimental PDB archive records; AlphaFold DB provides pre-computed predictions and confidence data; UniProt provides the reference accession and sequence. Users remain responsible for source terms and downstream redistribution. See [SOURCE\_POLICY.md](SOURCE_POLICY.md) and the provider contracts under `source_contracts/`.

### Support

See [SUPPORT.md](SUPPORT.md). Candidate upload and Store publication are intentionally outside this implementation.

# Actor input Schema

## `inputSchemaVersion` (type: `integer`):

Versioned runtime input contract.

## `targets` (type: `array`):

Provide 1-500 targets. Each object must contain exactly one UniProt, PDB, or AlphaFold DB identifier.

## `includeExperimental` (type: `boolean`):

Include official PDB experimental records.

## `includePredicted` (type: `boolean`):

Include existing AlphaFold DB predictions, always labeled predicted.

## `includeLigands` (type: `boolean`):

Include observed ligand metadata without inferring relevance.

## `includeCoordinates` (type: `boolean`):

Copy up to three authorized official mmCIF files per target to KVS, capped at 5 MB each and 10 MB total per target.

## `selectionCriteria` (type: `object`):

Optional transparent filters. The Actor never chooses a best structure.

## `concurrency` (type: `integer`):

Maximum simultaneous targets; source and charge caps remain global.

## Actor input object example

```json
{
  "inputSchemaVersion": 1,
  "targets": [
    {
      "uniprotId": "P69905"
    }
  ],
  "includeExperimental": true,
  "includePredicted": true,
  "includeLigands": true,
  "includeCoordinates": false,
  "concurrency": 4
}
```

# Actor output Schema

## `defaultDataset` (type: `string`):

No description

## `artifactManifest` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "targets": [
        {
            "uniprotId": "P69905"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("flintglade/protein-structure-evidence-resolver").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "targets": [{ "uniprotId": "P69905" }] }

# Run the Actor and wait for it to finish
run = client.actor("flintglade/protein-structure-evidence-resolver").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "targets": [
    {
      "uniprotId": "P69905"
    }
  ]
}' |
apify call flintglade/protein-structure-evidence-resolver --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=flintglade/protein-structure-evidence-resolver",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Protein Structure Evidence Resolver",
        "description": "Resolve protein structure evidence across RCSB PDB, PDBe, AlphaFold DB, and UniProt with source provenance, conflicts, and downloadable artifacts.",
        "version": "0.1",
        "x-build-id": "rnD5aMnXtZ5TJtjfb"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/flintglade~protein-structure-evidence-resolver/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-flintglade-protein-structure-evidence-resolver",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/flintglade~protein-structure-evidence-resolver/runs": {
            "post": {
                "operationId": "runs-sync-flintglade-protein-structure-evidence-resolver",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/flintglade~protein-structure-evidence-resolver/run-sync": {
            "post": {
                "operationId": "run-sync-flintglade-protein-structure-evidence-resolver",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "targets"
                ],
                "properties": {
                    "inputSchemaVersion": {
                        "title": "Input schema version",
                        "minimum": 1,
                        "maximum": 1,
                        "type": "integer",
                        "description": "Versioned runtime input contract.",
                        "default": 1
                    },
                    "targets": {
                        "title": "Public protein targets",
                        "minItems": 1,
                        "maxItems": 500,
                        "type": "array",
                        "description": "Provide 1-500 targets. Each object must contain exactly one UniProt, PDB, or AlphaFold DB identifier.",
                        "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                                "uniprotId": {
                                    "type": "string",
                                    "title": "UniProt accession",
                                    "description": "A public UniProtKB accession such as P69905.",
                                    "pattern": "^[A-Za-z0-9]{6,10}$",
                                    "maxLength": 10
                                },
                                "pdbId": {
                                    "type": "string",
                                    "title": "PDB identifier",
                                    "description": "A four-character experimental PDB identifier such as 1CBS.",
                                    "pattern": "^[0-9][A-Za-z0-9]{3}$",
                                    "minLength": 4,
                                    "maxLength": 4
                                },
                                "alphaFoldId": {
                                    "type": "string",
                                    "title": "AlphaFold DB model identifier",
                                    "description": "An existing AlphaFold DB model identifier such as AF-P69905-F1.",
                                    "pattern": "^AF-[A-Za-z0-9]{6,10}-F[1-9][0-9]*$",
                                    "maxLength": 25
                                }
                            }
                        }
                    },
                    "includeExperimental": {
                        "title": "Experimental structures",
                        "type": "boolean",
                        "description": "Include official PDB experimental records.",
                        "default": true
                    },
                    "includePredicted": {
                        "title": "Predicted models",
                        "type": "boolean",
                        "description": "Include existing AlphaFold DB predictions, always labeled predicted.",
                        "default": true
                    },
                    "includeLigands": {
                        "title": "Observed ligand metadata",
                        "type": "boolean",
                        "description": "Include observed ligand metadata without inferring relevance.",
                        "default": true
                    },
                    "includeCoordinates": {
                        "title": "Coordinate artifacts",
                        "type": "boolean",
                        "description": "Copy up to three authorized official mmCIF files per target to KVS, capped at 5 MB each and 10 MB total per target.",
                        "default": false
                    },
                    "selectionCriteria": {
                        "title": "Explicit filters",
                        "type": "object",
                        "description": "Optional transparent filters. The Actor never chooses a best structure.",
                        "properties": {
                            "experimentalOnly": {
                                "type": "boolean",
                                "title": "Experimental only",
                                "description": "Exclude predicted models from the explicit filtered ordering.",
                                "default": false
                            },
                            "minimumCoverage": {
                                "type": "number",
                                "title": "Minimum sequence coverage",
                                "description": "Retain structures meeting this exact mapped-sequence fraction.",
                                "minimum": 0,
                                "maximum": 1
                            },
                            "methods": {
                                "type": "array",
                                "title": "Experimental methods",
                                "description": "Retain exact case-normalized experimental method names.",
                                "minItems": 1,
                                "maxItems": 10,
                                "uniqueItems": true,
                                "items": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 100
                                }
                            },
                            "maximumResolution": {
                                "type": "number",
                                "title": "Maximum resolution",
                                "description": "Retain applicable resolutions at or below this Angstrom value; runtime requires a value greater than zero.",
                                "minimum": 0,
                                "maximum": 100
                            }
                        },
                        "additionalProperties": false
                    },
                    "concurrency": {
                        "title": "Target concurrency",
                        "minimum": 1,
                        "maximum": 8,
                        "type": "integer",
                        "description": "Maximum simultaneous targets; source and charge caps remain global.",
                        "default": 4
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
