{
  "openapi": "3.0.1",
  "info": {
    "title": "NMC Doctor Registration Check & Verification API",
    "description": "Verify Indian doctors on the NMC Indian Medical Register (IMR, formerly MCI). Check registration numbers singly or in bulk with name and council cross-checks, search doctors by name with spelling-tolerant matching, and flag removed or blacklisted doctors. JSON, CSV, API, MCP.",
    "version": "1.0",
    "x-build-id": "G5tGhF2uIsVAckR9N"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/whoareyouanas~nmc-doctor-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-whoareyouanas-nmc-doctor-lookup",
        "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/whoareyouanas~nmc-doctor-lookup/runs": {
      "post": {
        "operationId": "runs-sync-whoareyouanas-nmc-doctor-lookup",
        "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/whoareyouanas~nmc-doctor-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-whoareyouanas-nmc-doctor-lookup",
        "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": {
          "registrationId": {
            "title": "Registration number",
            "type": "string",
            "description": "One doctor registration number to verify, as printed on the certificate or prescription, e.g. 2000010031, 12345 or DMC/R/9095. Council prefixes, separators and leading zeros are optional. Returns status valid, name_mismatch, removed, blacklisted, not_found, ambiguous or error."
          },
          "name": {
            "title": "Doctor name",
            "type": "string",
            "description": "Doctor's name. With a registration number it cross-checks identity (nameMatch exact, strong, partial or mismatch). Without one it searches the register by name, tolerating spelling variants (Samrin/Samreen, Rehman/Rahman), any word order, missing middle names and initials. Titles like Dr. are ignored."
          },
          "stateMedicalCouncil": {
            "title": "State Medical Council",
            "type": "string",
            "description": "Optional council filter. Accepts a code (MAH, DEL, KAR, TAM, WES, TC), council name, state name (Maharashtra, Kerala, West Bengal) or abbreviation (MMC, DMC, KMC, TNMC, WBMC). Needed to tell apart the same number issued by different councils."
          },
          "year": {
            "title": "Year of registration",
            "minimum": 1900,
            "maximum": 2100,
            "type": "integer",
            "description": "Optional year of registration (NMC 'Year of Info'), 1900 to the current year. Filters name search and listing; when verifying, it only breaks ties between entries sharing a number."
          },
          "registrationIds": {
            "title": "Registration numbers (batch)",
            "type": "array",
            "description": "Many registration numbers to verify in one run; one result row each, in input order. The State Medical Council above applies to all of them. To pair each number with its own name or council, use Doctors instead.",
            "items": {
              "type": "string"
            }
          },
          "doctors": {
            "title": "Doctors (batch with name and council)",
            "type": "array",
            "description": "Batch KYC list. Each item: {\"registrationId\": \"12345\", \"name\": \"Asha Rao\", \"stateMedicalCouncil\": \"Karnataka\", \"year\": 2010}. Only registrationId or name is required. Items with a number are verified (and name-checked); items with only a name are searched. Results keep input order.",
            "items": {
              "type": "object",
              "properties": {
                "registrationId": {
                  "title": "Registration number",
                  "type": "string",
                  "description": "Registration number to verify."
                },
                "name": {
                  "title": "Doctor name",
                  "type": "string",
                  "description": "Name to cross-check, or to search for when there is no registration number."
                },
                "stateMedicalCouncil": {
                  "title": "State Medical Council",
                  "type": "string",
                  "description": "Council code, council name, state name or abbreviation."
                },
                "year": {
                  "title": "Year of registration",
                  "type": "integer",
                  "description": "Year of registration (Year of Info)."
                }
              }
            }
          },
          "maxResults": {
            "title": "Max search results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum candidates returned per name search or listing (1-10000, default 100). Best matches come first. Use 5-20 when you only need the likely doctor.",
            "default": 100
          },
          "nameMatching": {
            "title": "Name matching",
            "enum": [
              "smart",
              "contains"
            ],
            "type": "string",
            "description": "smart (default): spelling variants, any word order, initials and middle names, ranked by matchScore. contains: NMC's own behaviour, only names containing the exact text, in register order.",
            "default": "smart"
          },
          "includeDetails": {
            "title": "Include personal details",
            "type": "boolean",
            "description": "Include date of birth, permanent address and UPRN number from the register (default true). Turn off to keep only professional fields.",
            "default": true
          },
          "includeRaw": {
            "title": "Include raw NMC record",
            "type": "boolean",
            "description": "Attach the unmodified NMC record to each row for audit or debugging.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Lookups processed in parallel (1-10, default 3). Requests to NMC are capped at 4 in flight regardless.",
            "default": 3
          },
          "delayMs": {
            "title": "Delay between lookups (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Optional pause after each lookup, in milliseconds (0-10000).",
            "default": 0
          },
          "requestTimeoutSecs": {
            "title": "Request timeout",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Timeout for each request to nmc.org.in, in seconds (1-300, default 60).",
            "default": 60
          },
          "maxRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Retries after a failed or throttled NMC request, with exponential backoff (0-5, default 3).",
            "default": 3
          },
          "allowInsecureTls": {
            "title": "Allow insecure TLS",
            "type": "boolean",
            "description": "Last resort if nmc.org.in's certificate chain breaks. Certificate checks stay on by default; the actor already bundles NMC's missing intermediate certificate.",
            "default": false
          },
          "stateMedicalCouncilId": {
            "title": "State Medical Council code (deprecated)",
            "type": "string",
            "description": "Deprecated alias of stateMedicalCouncil, kept for older integrations."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}