{
 "openapi": "3.1.0",
 "info": {
  "title": "medtourism.guide open data API",
  "version": "1.0.0",
  "description": "Read-only. Prices and terms that clinics abroad publish on their own websites, as shown on the released pages of medtourism.guide. Static JSON files, no key. Free to query and to cite. Each figure you use must link to the medtourism.guide page it comes from, with the observed date. Bulk copying or redistribution of the dataset, or of a substantial part of it, needs our written permission. Prices are as clinics published them on their own websites on the observed date; they may have changed since.",
  "license": {
   "name": "medtourism.guide data terms",
   "url": "https://medtourism.guide/api/#terms"
  },
  "contact": {
   "url": "https://medtourism.guide/contact/"
  }
 },
 "servers": [
  {
   "url": "https://medtourism.guide/api/v1"
  }
 ],
 "security": [],
 "paths": {
  "/topics.json": {
   "get": {
    "operationId": "listTopics",
    "summary": "Released treatments with their price scopes",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "generated_at": {
           "type": "string",
           "format": "date-time"
          },
          "data_version": {
           "type": "string"
          },
          "licence": {
           "type": "string"
          },
          "cite_as": {
           "type": "string"
          },
          "count": {
           "type": "integer"
          },
          "topics": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "topic_id": {
              "type": "string"
             },
             "slug": {
              "type": "string"
             },
             "title": {
              "type": "string"
             },
             "page_url": {
              "type": "string"
             },
             "countries": {
              "type": "array",
              "items": {
               "type": "string"
              }
             },
             "scopes": {
              "type": "array",
              "items": {
               "type": "object",
               "properties": {
                "scope_id": {
                 "type": "string"
                },
                "name": {
                 "type": "string"
                },
                "unit": {
                 "type": [
                  "string",
                  "null"
                 ]
                }
               }
              }
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file (for routes: no released page for this topic and country)"
     }
    }
   }
  },
  "/routes.json": {
   "get": {
    "operationId": "listRoutes",
    "summary": "Released route pages (treatment × country, and city pages) with the lowest price per scope",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "generated_at": {
           "type": "string",
           "format": "date-time"
          },
          "data_version": {
           "type": "string"
          },
          "licence": {
           "type": "string"
          },
          "cite_as": {
           "type": "string"
          },
          "count": {
           "type": "integer"
          },
          "routes": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "topic": {
              "type": "string"
             },
             "topic_slug": {
              "type": "string"
             },
             "country": {
              "type": "string"
             },
             "country_slug": {
              "type": "string"
             },
             "city": {
              "type": [
               "string",
               "null"
              ]
             },
             "page_url": {
              "type": "string"
             },
             "data_url": {
              "type": "string"
             },
             "providers": {
              "type": "integer"
             },
             "providers_with_price": {
              "type": "integer"
             },
             "lowest_by_scope": {
              "type": "array",
              "items": {
               "type": "object",
               "properties": {
                "scope_id": {
                 "type": "string"
                },
                "scope": {
                 "type": "string"
                },
                "unit": {
                 "type": [
                  "string",
                  "null"
                 ]
                },
                "lowest_price": {
                 "type": [
                  "number",
                  "null"
                 ]
                },
                "currency": {
                 "type": "string"
                },
                "price_type": {
                 "type": "string"
                },
                "provider": {
                 "type": "string"
                },
                "usd_approx": {
                 "type": [
                  "number",
                  "null"
                 ]
                },
                "observed": {
                 "type": "string",
                 "format": "date"
                }
               }
              }
             },
             "last_checked": {
              "type": "string",
              "format": "date"
             },
             "cite_as": {
              "type": "string"
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file (for routes: no released page for this topic and country)"
     }
    }
   }
  },
  "/routes/{topic}/{country}.json": {
   "get": {
    "operationId": "getRoutePrices",
    "summary": "Every row a released route page shows",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "generated_at": {
           "type": "string",
           "format": "date-time"
          },
          "data_version": {
           "type": "string"
          },
          "licence": {
           "type": "string"
          },
          "cite_as": {
           "type": "string"
          },
          "topic": {
           "type": "string"
          },
          "topic_slug": {
           "type": "string"
          },
          "country": {
           "type": "string"
          },
          "country_slug": {
           "type": "string"
          },
          "page_url": {
           "type": "string"
          },
          "page_title": {
           "type": "string"
          },
          "last_checked": {
           "type": "string",
           "format": "date"
          },
          "rows": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "provider": {
              "type": "string"
             },
             "provider_id": {
              "type": "string"
             },
             "city": {
              "type": [
               "string",
               "null"
              ]
             },
             "official_website": {
              "type": [
               "string",
               "null"
              ]
             },
             "profile_url": {
              "type": "string"
             },
             "scope_id": {
              "type": [
               "string",
               "null"
              ]
             },
             "procedure": {
              "type": "string"
             },
             "procedure_scope": {
              "type": [
               "string",
               "null"
              ]
             },
             "price_value": {
              "type": [
               "number",
               "null"
              ]
             },
             "price_min": {
              "type": [
               "number",
               "null"
              ]
             },
             "price_max": {
              "type": [
               "number",
               "null"
              ]
             },
             "currency": {
              "type": [
               "string",
               "null"
              ]
             },
             "price_type": {
              "type": [
               "string",
               "null"
              ]
             },
             "is_treatment_price": {
              "type": "boolean"
             },
             "stale": {
              "type": "boolean"
             },
             "includes": {
              "type": "array",
              "items": {
               "type": "string"
              }
             },
             "excludes": {
              "type": "array",
              "items": {
               "type": "string"
              }
             },
             "source_url": {
              "type": [
               "string",
               "null"
              ]
             },
             "observed": {
              "type": "string",
              "format": "date"
             },
             "page_url": {
              "type": "string"
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file (for routes: no released page for this topic and country)"
     }
    },
    "parameters": [
     {
      "name": "topic",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "topic slug from topics.json"
     },
     {
      "name": "country",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "country slug from routes.json"
     }
    ]
   }
  },
  "/providers.json": {
   "get": {
    "operationId": "listProviders",
    "summary": "Clinics on released route pages",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "generated_at": {
           "type": "string",
           "format": "date-time"
          },
          "data_version": {
           "type": "string"
          },
          "licence": {
           "type": "string"
          },
          "cite_as": {
           "type": "string"
          },
          "count": {
           "type": "integer"
          },
          "providers": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "name": {
              "type": "string"
             },
             "provider_id": {
              "type": "string"
             },
             "country": {
              "type": "string"
             },
             "city": {
              "type": [
               "string",
               "null"
              ]
             },
             "official_website": {
              "type": [
               "string",
               "null"
              ]
             },
             "profile_url": {
              "type": "string"
             },
             "topics": {
              "type": "array",
              "items": {
               "type": "string"
              }
             },
             "route_pages": {
              "type": "array",
              "items": {
               "type": "string"
              }
             },
             "last_checked": {
              "type": "string",
              "format": "date"
             }
            }
           }
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file (for routes: no released page for this topic and country)"
     }
    }
   }
  },
  "/fx.json": {
   "get": {
    "operationId": "getFx",
    "summary": "Exchange rates the pages use for conversions",
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "generated_at": {
           "type": "string",
           "format": "date-time"
          },
          "data_version": {
           "type": "string"
          },
          "licence": {
           "type": "string"
          },
          "cite_as": {
           "type": "string"
          },
          "date": {
           "type": [
            "string",
            "null"
           ]
          },
          "base": {
           "type": "string"
          },
          "rates": {
           "type": "object",
           "additionalProperties": {
            "type": "number"
           }
          },
          "sources": {
           "type": "object"
          },
          "note": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "No such file (for routes: no released page for this topic and country)"
     }
    }
   }
  }
 }
}