{
  "openapi": "3.0.1",
  "info": {
    "title": "France Medicines Database: Prices, Reimbursement & Generics",
    "description": "Official French medicines database (BDPM): CIP13/CIS lookup, public prices, reimbursement rates, generic groups, HAS SMR/ASMR ratings, shortages. Pay per record.",
    "version": "1.0",
    "x-build-id": "AnH68bolLPgM5ziry"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datacraft-studio~france-medicines-database/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datacraft-studio-france-medicines-database",
        "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/datacraft-studio~france-medicines-database/runs": {
      "post": {
        "operationId": "runs-sync-datacraft-studio-france-medicines-database",
        "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/datacraft-studio~france-medicines-database/run-sync": {
      "post": {
        "operationId": "run-sync-datacraft-studio-france-medicines-database",
        "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": {
          "codes": {
            "title": "CIP13 / CIP7 / CIS codes",
            "type": "array",
            "description": "Look up these codes (13-digit CIP13 barcode starting with 34, 7-digit CIP7 or 8-digit CIS). Withdrawn or not-marketed medicines still in the database are returned too. Leave empty to search.",
            "items": {
              "type": "string"
            }
          },
          "nameContains": {
            "title": "Name contains",
            "type": "array",
            "description": "Medicine name contains any of these words (accents and case ignored), e.g. DOLIPRANE.",
            "items": {
              "type": "string"
            }
          },
          "substances": {
            "title": "Active substances",
            "type": "array",
            "description": "Active substance contains any of these (e.g. paracetamol, amoxicilline). Also matches the generic group label.",
            "items": {
              "type": "string"
            }
          },
          "holders": {
            "title": "Marketing authorisation holders",
            "type": "array",
            "description": "Holder (laboratory) name contains any of these, e.g. SANOFI, BIOGARAN.",
            "items": {
              "type": "string"
            }
          },
          "routes": {
            "title": "Routes of administration",
            "type": "array",
            "description": "e.g. orale, cutanée, intraveineuse.",
            "items": {
              "type": "string"
            }
          },
          "atcPrefixes": {
            "title": "ATC code prefixes",
            "type": "array",
            "description": "e.g. N02 (analgesics). ATC codes are only published for medicines of major therapeutic interest (MITM, about half of the database).",
            "items": {
              "type": "string"
            }
          },
          "onlyMarketed": {
            "title": "Only marketed medicines",
            "type": "boolean",
            "description": "Skip medicines not marketed any more (ignored for code lookups).",
            "default": true
          },
          "onlyActiveAuthorisation": {
            "title": "Only active marketing authorisations",
            "type": "boolean",
            "description": "Skip withdrawn, suspended or archived authorisations (ignored for code lookups).",
            "default": true
          },
          "onlyReimbursed": {
            "title": "Only reimbursed",
            "type": "boolean",
            "description": "Only medicines with a Social Security reimbursement rate.",
            "default": false
          },
          "reimbursementRates": {
            "title": "Reimbursement rates",
            "type": "array",
            "description": "Keep only these rates, in % (15, 30, 65, 100).",
            "items": {
              "type": "string"
            }
          },
          "genericFilter": {
            "title": "Generics",
            "enum": [
              "any",
              "princeps",
              "generic",
              "in_group",
              "no_group"
            ],
            "type": "string",
            "description": "Filter on the official generic groups.",
            "default": "any"
          },
          "minSmr": {
            "title": "Minimum HAS SMR rating",
            "enum": [
              "any",
              "insuffisant",
              "faible",
              "modéré",
              "important"
            ],
            "type": "string",
            "description": "Latest Medical Service Rendered (SMR) rating from the HAS Transparency Committee.",
            "default": "any"
          },
          "onlyAvailabilityIssues": {
            "title": "Only shortages",
            "type": "boolean",
            "description": "Only medicines with an ANSM stock-out, supply tension or discontinuation notice.",
            "default": false
          },
          "onlyMajorTherapeuticInterest": {
            "title": "Only major therapeutic interest (MITM)",
            "type": "boolean",
            "description": "Medicines whose shortage would put patients at risk (ANSM MITM list).",
            "default": false
          },
          "onlyEnhancedMonitoring": {
            "title": "Only additional monitoring (black triangle)",
            "type": "boolean",
            "description": "Medicines under additional EU monitoring.",
            "default": false
          },
          "authorisedSince": {
            "title": "Authorised since",
            "type": "string",
            "description": "Marketing authorisation on or after this date (YYYY-MM-DD)."
          },
          "minPublicPrice": {
            "title": "Min public price (€)",
            "type": "string",
            "description": "At least one marketed box at or above this price."
          },
          "maxPublicPrice": {
            "title": "Max public price (€)",
            "type": "string",
            "description": "At least one marketed box at or below this price."
          },
          "outputLevel": {
            "title": "One row per",
            "enum": [
              "medicine",
              "presentation"
            ],
            "type": "string",
            "description": "Medicine (CIS, with all its boxes nested) or presentation (one row per CIP13 box).",
            "default": "medicine"
          },
          "includeComposition": {
            "title": "Include composition",
            "type": "boolean",
            "description": "Active substances and dosages.",
            "default": true
          },
          "includeHasOpinions": {
            "title": "Include HAS opinion history",
            "type": "boolean",
            "description": "All SMR / ASMR opinions (the latest one is always included).",
            "default": true
          },
          "includeOpinionTexts": {
            "title": "Include HAS opinion texts",
            "type": "boolean",
            "description": "Full wording of SMR / ASMR opinions (longer rows).",
            "default": false
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "name",
              "newest_authorisation",
              "price_asc",
              "price_desc",
              "cis"
            ],
            "type": "string",
            "description": "Order of the rows.",
            "default": "name"
          },
          "onlyNew": {
            "title": "Alert mode (only new or changed)",
            "type": "boolean",
            "description": "Return only rows that are new or changed (price, reimbursement, status, shortage, generic group, HAS opinion) since the previous run with the same state store.",
            "default": false
          },
          "stateStoreName": {
            "title": "Alert state store name",
            "type": "string",
            "description": "Use one store name per saved search.",
            "default": "france-medicines-database-state"
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum rows delivered (and charged).",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}