{
  "openapi": "3.0.1",
  "info": {
    "title": "Molecular Evidence Pack Builder",
    "description": "Build a bounded, verified molecular evidence dossier from declared public identifiers.",
    "version": "0.1",
    "x-build-id": "pnRFMv0afjyBMtFgE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/flintglade~molecular-evidence-pack-builder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-flintglade-molecular-evidence-pack-builder",
        "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~molecular-evidence-pack-builder/runs": {
      "post": {
        "operationId": "runs-sync-flintglade-molecular-evidence-pack-builder",
        "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~molecular-evidence-pack-builder/run-sync": {
      "post": {
        "operationId": "run-sync-flintglade-molecular-evidence-pack-builder",
        "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": [
          "family"
        ],
        "properties": {
          "inputSchemaVersion": {
            "title": "Input schema version",
            "minimum": 1,
            "maximum": 1,
            "type": "integer",
            "description": "Runtime contract version; does not trigger source calls or affect cost.",
            "default": 1
          },
          "family": {
            "title": "Bounded protein or enzyme family",
            "required": [
              "name",
              "targetIdentifiers",
              "inclusionRules",
              "exclusionRules"
            ],
            "type": "object",
            "description": "Required declared family scope. Each target triggers bounded UniProt and, when requested, structure-source reads. At most 25 public targets; retained in the dossier.",
            "properties": {
              "name": {
                "type": "string",
                "title": "Family name",
                "description": "A user label retained in outputs; 1-200 characters, for example Flintglade demo family.",
                "minLength": 1,
                "maxLength": 200
              },
              "targetIdentifiers": {
                "type": "array",
                "title": "Declared public targets",
                "description": "1-25 exact UniProt accessions. Optional ChEMBL target IDs are required for bounded bioactivity queries and are checked against source evidence.",
                "minItems": 1,
                "maxItems": 25,
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "uniprotId": {
                      "type": "string",
                      "title": "UniProt accession",
                      "description": "Exact public UniProtKB accession, for example P69905.",
                      "pattern": "^[A-Za-z0-9]{6,10}$",
                      "minLength": 6,
                      "maxLength": 10
                    },
                    "chemblTargetId": {
                      "type": "string",
                      "title": "ChEMBL target ID",
                      "description": "Optional exact ChEMBL target ID for bioactivity, for example CHEMBL2093866.",
                      "pattern": "^CHEMBL[0-9]+$",
                      "maxLength": 30
                    }
                  },
                  "required": [
                    "uniprotId"
                  ]
                }
              },
              "inclusionRules": {
                "type": "array",
                "title": "Inclusion rules",
                "description": "1-25 explicit rules retained verbatim; each is at most 500 characters.",
                "minItems": 1,
                "maxItems": 25,
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                }
              },
              "exclusionRules": {
                "type": "array",
                "title": "Exclusion rules",
                "description": "1-25 explicit exclusions retained verbatim; each is at most 500 characters.",
                "minItems": 1,
                "maxItems": 25,
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                }
              }
            },
            "additionalProperties": false
          },
          "compounds": {
            "title": "Supplied compounds",
            "maxItems": 500,
            "type": "array",
            "description": "0-500 exact public identifiers. No similarity, substructure, or open-ended discovery is performed. Source calls are bounded per supplied item; values are retained in the dossier.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "type": {
                  "type": "string",
                  "title": "Identifier type",
                  "description": "Select one exact public identifier namespace; this controls which bounded official lookup is made.",
                  "enum": [
                    "pubchemCid",
                    "chemblId",
                    "inchiKey",
                    "smiles"
                  ]
                },
                "value": {
                  "type": "string",
                  "title": "Identifier",
                  "description": "Exact public value retained in output; 1-500 characters, for example 2519.",
                  "minLength": 1,
                  "maxLength": 500
                }
              },
              "required": [
                "type",
                "value"
              ]
            }
          },
          "bioactivityFilters": {
            "title": "Lossless ChEMBL activity admission filters",
            "type": "object",
            "description": "Applied only when includeBioactivity is true. Filters narrow official ChEMBL activity reads and can change dossier size, not the one-event price.",
            "properties": {
              "assayTypes": {
                "type": "array",
                "title": "Assay types",
                "description": "Admit 1-6 exact ChEMBL assay type codes; values are retained and can reduce output size.",
                "minItems": 1,
                "maxItems": 6,
                "uniqueItems": true,
                "items": {
                  "type": "string",
                  "pattern": "^[BFAPTU]$"
                },
                "default": [
                  "B",
                  "F"
                ]
              },
              "standardTypes": {
                "type": "array",
                "title": "Quantity types",
                "description": "Admit 1-25 exact source quantity labels such as IC50; values are retained and never treated as synonyms.",
                "minItems": 1,
                "maxItems": 25,
                "uniqueItems": true,
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "default": [
                  "IC50",
                  "Ki",
                  "Kd",
                  "EC50"
                ]
              },
              "relationHandling": {
                "type": "string",
                "title": "Relation handling",
                "description": "preserve retains censored operators and refuses pooling; exact_only excludes them.",
                "enum": [
                  "preserve",
                  "exact_only"
                ],
                "default": "preserve"
              },
              "units": {
                "type": "array",
                "title": "Allowed source units",
                "description": "Admit 1-20 exact source units; no hidden unit conversion is performed.",
                "minItems": 1,
                "maxItems": 20,
                "uniqueItems": true,
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "default": [
                  "nM"
                ]
              },
              "organisms": {
                "type": "array",
                "title": "Allowed target organisms",
                "description": "Optionally admit up to 25 exact source organism strings; empty keeps all declared-target organisms.",
                "maxItems": 25,
                "uniqueItems": true,
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "default": []
              },
              "targetScope": {
                "type": "string",
                "title": "Target scope",
                "description": "Version 0.1 can query only exact targets declared in family.targetIdentifiers.",
                "enum": [
                  "declared_only"
                ],
                "default": "declared_only"
              }
            },
            "additionalProperties": false
          },
          "includeStructures": {
            "title": "Include structure evidence",
            "type": "boolean",
            "description": "When true, reads up to five declared PDB cross-references and one bounded AlphaFold DB response per target; retained in the archive; does not add events.",
            "default": true
          },
          "includeBioactivity": {
            "title": "Include admitted bioactivity",
            "type": "boolean",
            "description": "When true, queries only declared ChEMBL target/molecule pairs with explicit filters; up to maxActivities rows are retained; does not add events.",
            "default": true
          },
          "includeCoordinates": {
            "title": "Include coordinates",
            "type": "boolean",
            "description": "Version 0.1 does not copy coordinate files. Runtime validation requires false.",
            "default": false
          },
          "maxActivities": {
            "title": "Maximum admitted activities",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "1-50,000 normalized rows; bounds ChEMBL pagination and archive size; does not change the one-event price.",
            "default": 10000
          },
          "archiveFormat": {
            "title": "Archive format",
            "enum": [
              "zip"
            ],
            "type": "string",
            "description": "Version 0.1 supports a deterministic verified ZIP only.",
            "default": "zip"
          },
          "expertReviewMode": {
            "title": "Expert review mode",
            "type": "boolean",
            "description": "Required for prepublication candidate builds. Review notes are never inserted into customer archives before approval.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}