{
  "openapi": "3.0.1",
  "info": {
    "title": "DICOMweb QIDO-RS Extractor",
    "description": "Point at ANY DICOMweb QIDO-RS server (Orthanc, dcm4chee, Google Healthcare, DICOMcloud) and query medical-imaging metadata at study, series or instance level. Decodes DICOM-tag JSON to clean fields, keeps the raw tags. Metadata only, no pixels.",
    "version": "0.1",
    "x-build-id": "fI59NlDAg3ne1hHle"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datamule~dicomweb-qido-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datamule-dicomweb-qido-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~dicomweb-qido-extractor/runs": {
      "post": {
        "operationId": "runs-sync-datamule-dicomweb-qido-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~dicomweb-qido-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-datamule-dicomweb-qido-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": [
          "dicomWebUrls"
        ],
        "properties": {
          "dicomWebUrls": {
            "title": "DICOMweb (QIDO-RS) base URL(s)",
            "type": "array",
            "description": "One or more DICOMweb QIDO-RS root URLs — the part BEFORE /studies, e.g. https://demo.orthanc-server.com/dicom-web . Works with any conformant server (Orthanc, dcm4chee, Google Cloud Healthcare, DICOMcloud, …). A trailing /studies, /series or /instances is stripped automatically.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Query level (mode)",
            "enum": [
              "studies",
              "series",
              "instances"
            ],
            "type": "string",
            "description": "Which QIDO-RS level to query. 'studies' = one row per matching study; 'series' = one row per series (all studies, or under a given study); 'instances' = one row per SOP instance (all, under a study, or under a specific series).",
            "default": "studies"
          },
          "studyInstanceUID": {
            "title": "StudyInstanceUID (scope)",
            "type": "string",
            "description": "Optional. Scope 'series'/'instances' modes UNDER this study (queries /studies/{uid}/series or /instances). Leave blank to query the level across the whole server."
          },
          "seriesInstanceUID": {
            "title": "SeriesInstanceUID (scope)",
            "type": "string",
            "description": "Optional. With a StudyInstanceUID and mode=instances, scope instances UNDER this specific series (/studies/{study}/series/{series}/instances)."
          },
          "PatientID": {
            "title": "PatientID filter",
            "type": "string",
            "description": "Optional QIDO match filter on PatientID (tag 00100020)."
          },
          "PatientName": {
            "title": "PatientName filter",
            "type": "string",
            "description": "Optional QIDO match filter on PatientName (tag 00100010). Wildcards (*) are supported by most servers; enable fuzzymatching for partial names."
          },
          "StudyDate": {
            "title": "StudyDate filter",
            "type": "string",
            "description": "Optional QIDO match on StudyDate (tag 00080020). Single date YYYYMMDD, or a range YYYYMMDD-YYYYMMDD (e.g. 20060101-20061231)."
          },
          "ModalitiesInStudy": {
            "title": "ModalitiesInStudy filter",
            "type": "string",
            "description": "Optional QIDO match on ModalitiesInStudy (tag 00080061), e.g. CT, MR, US, CR. Studies-level filter."
          },
          "AccessionNumber": {
            "title": "AccessionNumber filter",
            "type": "string",
            "description": "Optional QIDO match on AccessionNumber (tag 00080050)."
          },
          "includefield": {
            "title": "includefield (extra attributes)",
            "type": "array",
            "description": "Optional list of DICOM keywords or hex tags to additionally return, or the single value 'all' to request every available attribute. QIDO-RS 'includefield' param.",
            "items": {
              "type": "string"
            }
          },
          "fuzzymatching": {
            "title": "Fuzzy name matching",
            "type": "boolean",
            "description": "Request fuzzymatching=true so the server does approximate PatientName matching (support varies by server).",
            "default": false
          },
          "extraQueryParams": {
            "title": "Extra QIDO query params",
            "type": "object",
            "description": "Optional free-form extra query parameters forwarded verbatim (any DICOM keyword/tag the server supports as a match key). limit/offset are managed for you and ignored here."
          },
          "pageLimit": {
            "title": "Page size (limit)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "QIDO 'limit' per request. The actor paginates with limit+offset until a short page or maxRecords.",
            "default": 100
          },
          "maxRecords": {
            "title": "Max records",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after emitting this many rows across all sources (safety cap). Default 1000.",
            "default": 1000
          },
          "bearerToken": {
            "title": "Bearer token (optional)",
            "type": "string",
            "description": "Optional OAuth2 bearer token for protected DICOMweb servers (e.g. Google Cloud Healthcare). Sent as Authorization: Bearer <token>. Never required or logged for public servers."
          },
          "extraHeaders": {
            "title": "Extra HTTP headers (optional)",
            "type": "object",
            "description": "Optional extra request headers (e.g. an API key header) merged into every request."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}