{
  "openapi": "3.0.1",
  "info": {
    "title": "Healthcare Price Transparency API - Negotiated & Cash Prices",
    "description": "Healthcare price transparency data from the Turquoise Health API: negotiated insurance rates and cash prices for shoppable procedures at hospitals, surgery and imaging centers, price statistics, payers, networks and service packages. Bring your own key.",
    "version": "0.1",
    "x-build-id": "lR15a2sW8QNaAIW0I"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~healthcare-price-transparency-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-healthcare-price-transparency-api",
        "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/nabeelbaghoor~healthcare-price-transparency-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-healthcare-price-transparency-api",
        "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/nabeelbaghoor~healthcare-price-transparency-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-healthcare-price-transparency-api",
        "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",
        "properties": {
          "mode": {
            "title": "What to get",
            "enum": [
              "priceSearch",
              "priceStatistics",
              "priceById",
              "providerSearch",
              "providerById",
              "providerTypes",
              "payerSearch",
              "networkSearch",
              "packageSearch",
              "packageLineItems"
            ],
            "type": "string",
            "description": "Price search returns negotiated insurance rates or cash prices for one service package (a shoppable procedure such as a knee MRI or colonoscopy) across hospitals, surgery centers and imaging centers, cheapest or nearest first. Price statistics gives the count, minimum, quartiles, median, average and maximum of the same prices. Price by ID reads single prices, optionally with their billing line items. Provider, payer, network and service package search read the directories and give the IDs the price modes take. Provider types lists the valid provider type values. Package line items shows the billing codes inside a package.",
            "default": "priceSearch"
          },
          "packageId": {
            "title": "Service package ID",
            "type": "string",
            "description": "Price search and price statistics (required), and an optional filter on provider, payer and network search. The Turquoise Health package ID of a shoppable service, such as RA005 for a knee MRI. Find IDs with the Service package search mode."
          },
          "pricingType": {
            "title": "Pricing type",
            "enum": [
              "cash",
              "negotiated"
            ],
            "type": "string",
            "description": "Price search and price statistics. Cash is the self pay price; negotiated is the rate under one payer network, which needs the network ID.",
            "default": "cash"
          },
          "networkId": {
            "title": "Network ID",
            "type": "string",
            "description": "Negotiated pricing (required), and an optional filter on provider and package search. The payer network ID, such as -3776001016975145508. Find IDs with the Network search mode."
          },
          "providerId": {
            "title": "Provider ID",
            "type": "string",
            "description": "Optional on price search and price statistics (one facility only), and a filter on payer, network and package search. Find IDs with the Provider search mode."
          },
          "payerId": {
            "title": "Payer ID",
            "type": "string",
            "description": "Provider, network and package search only. Keeps records priced under this payer's networks. Find IDs with the Payer search mode."
          },
          "sort": {
            "title": "Sort prices by",
            "enum": [
              "total",
              "distance"
            ],
            "type": "string",
            "description": "Price search only.",
            "default": "total"
          },
          "sortDirection": {
            "title": "Sort direction",
            "enum": [
              "asc",
              "desc"
            ],
            "type": "string",
            "description": "Price search only.",
            "default": "asc"
          },
          "zip": {
            "title": "ZIP code",
            "type": "string",
            "description": "Search around the centroid of this 5 digit US ZIP code with the default radius. Set one location input only."
          },
          "latLng": {
            "title": "Coordinates",
            "type": "string",
            "description": "Instead of a ZIP code: latitude,longitude such as 39.746549,-104.966925."
          },
          "radiusMiles": {
            "title": "Radius (miles)",
            "minimum": 0.1,
            "maximum": 500,
            "type": "number",
            "description": "With coordinates only. The search radius around the point; Turquoise Health defaults to about 15.5 miles (25 km)."
          },
          "state": {
            "title": "State",
            "type": "string",
            "description": "Instead of a point: a two letter state code such as CO."
          },
          "cbsa": {
            "title": "Metro area (CBSA)",
            "type": "string",
            "description": "Instead of a point: a metro area name, matched as a case insensitive substring, such as Denver-Aurora."
          },
          "zipCodes": {
            "title": "ZIP code list",
            "type": "array",
            "description": "Instead of a point: providers in any of these 5 digit ZIP codes, one per line.",
            "items": {
              "type": "string"
            }
          },
          "ids": {
            "title": "IDs",
            "type": "array",
            "description": "Price by ID, provider by ID and package line items only. One price ID, provider ID or service package ID per line, up to 500 a run, read fresh from this API (IDs change when the data is refreshed). Each ID is one request.",
            "items": {
              "type": "string"
            }
          },
          "expandLineItems": {
            "title": "Include line items",
            "type": "boolean",
            "description": "Price by ID only. Inlines the billing codes, fee types and association rates that make up each priced package.",
            "default": false
          },
          "name": {
            "title": "Name contains",
            "type": "string",
            "description": "Provider, payer, network and package search. A case insensitive substring of the name, such as Inova or Aetna or MRI."
          },
          "searchText": {
            "title": "Semantic search",
            "type": "string",
            "description": "Provider, network and package search. A meaning based search such as knee imaging; answers one relevance ordered page of up to 250 results."
          },
          "minScore": {
            "title": "Minimum search score",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "With semantic search only. Drops results below this similarity score (0 to 1)."
          },
          "npi": {
            "title": "NPI",
            "type": "string",
            "description": "Provider search only. An exact 10 digit facility NPI."
          },
          "providerType": {
            "title": "Provider type",
            "type": "string",
            "description": "Provider search only. An exact provider type such as Hospital; list the valid values with the Provider types mode."
          },
          "anchorCode": {
            "title": "Billing code",
            "type": "string",
            "description": "Service package search only. A CPT or HCPCS anchor code such as 73721, returning the package built on it."
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The most rows this run returns and charges for. Searches stop paging once this many rows are in, so no request is spent on rows that would be cut.",
            "default": 100
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Pacing. A rate limit answer is waited out and retried; a used up allowance ends the run.",
            "default": 60
          },
          "clientId": {
            "title": "Client ID",
            "type": "string",
            "description": "Your own Turquoise Health API client id, issued with your API access. Stored as a secret. You can instead set the DATA_API_CLIENT_ID environment secret."
          },
          "apiKey": {
            "title": "Client secret",
            "type": "string",
            "description": "The client secret that goes with the client id. The client id, secret and organization id are exchanged at api.turquoise.health for an access token, reused for the whole run. You can paste a ready access token here instead and leave the client id empty. Stored as a secret, sent only to Turquoise Health, never logged. You can instead set the DATA_API_KEY environment secret."
          },
          "organizationId": {
            "title": "Organization ID",
            "type": "string",
            "description": "The organization id issued with your client id. Stored as a secret. You can instead set the DATA_API_ORGANIZATION_ID environment secret."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}