{
  "openapi": "3.0.1",
  "info": {
    "title": "Beacon v2 Genomics Extractor",
    "description": "Point at ANY GA4GH Beacon v2 endpoint (Progenetix, Cancer Cell Lines, ELIXIR/BSC) and pull biosamples, individuals, genomic variants, cohorts, datasets or filtering terms into clean flat rows. Auto-detects skip/limit paging, keeps the full record in _raw. Pay per record.",
    "version": "0.1",
    "x-build-id": "kt6LrHWs6RwQBdB3d"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datamule~beacon-v2-genomics-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datamule-beacon-v2-genomics-extractor",
        "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/datamule~beacon-v2-genomics-extractor/runs": {
      "post": {
        "operationId": "runs-sync-datamule-beacon-v2-genomics-extractor",
        "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/datamule~beacon-v2-genomics-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-datamule-beacon-v2-genomics-extractor",
        "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": [
          "sources"
        ],
        "properties": {
          "sources": {
            "title": "Beacon v2 base URL(s)",
            "type": "array",
            "description": "One or more GA4GH Beacon v2 base/root URLs. Examples: https://progenetix.org/beacon (Progenetix), https://cancercelllines.org/beacon (Cancer Cell Lines), https://beacons.bsc.es/beacon/v2.0.0 (ELIXIR Spain / BSC). Point at the beacon BASE — do NOT append an endpoint like /biosamples.",
            "items": {
              "type": "string"
            }
          },
          "endpoint": {
            "title": "Endpoint (entry type)",
            "enum": [
              "biosamples",
              "individuals",
              "g_variants",
              "analyses",
              "runs",
              "cohorts",
              "datasets",
              "filtering_terms",
              "info",
              "configuration",
              "entry_types",
              "map"
            ],
            "type": "string",
            "description": "Which Beacon v2 endpoint to query. Record endpoints (biosamples, individuals, g_variants, analyses, runs) emit one row per matched record and are paginated. Collection endpoints (cohorts, datasets) emit one row per collection. filtering_terms lists a beacon's queryable ontology terms. info / configuration / entry_types / map are single-object discovery maps of what a beacon exposes.",
            "default": "biosamples"
          },
          "filters": {
            "title": "Filters (ontology term IDs)",
            "type": "array",
            "description": "Optional Beacon filtering terms — CURIE-style ontology IDs applied to record queries, e.g. NCIT:C7376 (a cancer type), or an ICD-O / UBERON / EFO term. Some beacons (the bycon family: Progenetix, Cancer Cell Lines) REQUIRE at least one filter to return biosample/individual records (an unfiltered query returns HTTP 422 \"no valid query\"). Use filtering_terms mode to discover valid IDs for a beacon. Leave empty for beacons that serve records unfiltered (e.g. ELIXIR/BSC).",
            "items": {
              "type": "string"
            }
          },
          "requestParameters": {
            "title": "Request parameters (optional)",
            "type": "object",
            "description": "Optional extra Beacon query parameters as a JSON object, applied to every request. For g_variants (genomic variant) queries the range model uses e.g. {\"referenceName\": \"9\", \"start\": \"21000000\", \"end\": \"22000000\", \"variantType\": \"DEL\"}. The paging skip/limit and requestedGranularity are managed for you."
          },
          "granularity": {
            "title": "Granularity",
            "enum": [
              "record",
              "count",
              "boolean",
              "aggregated"
            ],
            "type": "string",
            "description": "Beacon requestedGranularity. \"record\" (default) returns full records; \"count\" / \"boolean\" return only aggregate discovery answers (numTotalResults / exists) with no patient-level data — many beacons only permit these for protected datasets. \"aggregated\" returns summary counts.",
            "default": "record"
          },
          "maxRecords": {
            "title": "Max records (total)",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum total number of rows to emit across all sources. skip/limit paging is followed until this cap is reached, so a huge beacon never runs forever. Each returned row is one billable event. Default 1000.",
            "default": 1000
          },
          "bearerToken": {
            "title": "Bearer token (optional)",
            "type": "string",
            "description": "Optional OAuth2 bearer token for auth-gated beacons that expose protected datasets. Sent as Authorization: Bearer ***. NOT required for public beacons (Progenetix, Cancer Cell Lines, ELIXIR/BSC) — leave empty. Never logged."
          },
          "extraHeaders": {
            "title": "Extra request headers",
            "type": "object",
            "description": "Optional extra HTTP headers to send with every request, as a JSON object, e.g. an API-key header a specific beacon node requires. Leave empty for public beacons."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}