{
  "openapi": "3.0.1",
  "info": {
    "title": "FDA Registered Medical Device Establishments Scraper",
    "description": "Directory of FDA-registered medical device establishments: manufacturers, importers, sterilizers and contract makers with owner/operator, US agent contact (name, phone, email), full address, FEI/registration number and listed products. Export to JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "NAefjxdWMHp7UH0Ah"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapers_lat~openfda-device-establishments-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapers_lat-openfda-device-establishments-scraper",
        "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/scrapers_lat~openfda-device-establishments-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapers_lat-openfda-device-establishments-scraper",
        "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/scrapers_lat~openfda-device-establishments-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapers_lat-openfda-device-establishments-scraper",
        "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": {
          "maxRecords": {
            "title": "Max Records",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Maximum number of establishments to collect. Optional. The source paginates up to 26000 records per query, so for very large pulls narrow by country, state or product code."
          },
          "searchQuery": {
            "title": "Search Query",
            "type": "string",
            "description": "A simple keyword (matched to the establishment name), or a raw openFDA-style expression containing a field, for example registration.owner_operator.firm_name:\"Medtronic\" or products.openfda.device_name:catheter. Leave empty to pull the most recent registrations."
          },
          "companyName": {
            "title": "Company Name",
            "type": "string",
            "description": "Filter by the registered establishment name or its owner/operator firm name (matches either), for example Boston Scientific."
          },
          "productCode": {
            "title": "FDA Product Code",
            "type": "string",
            "description": "Three-letter FDA product code of a device the establishment lists, for example LLZ (infusion pump) or DXN. Comma-separate for multiple."
          },
          "deviceName": {
            "title": "Device Name Keyword",
            "type": "string",
            "description": "Keyword matched against the FDA device name of the establishment's listed products, for example catheter, stent, ventilator."
          },
          "establishmentType": {
            "title": "Establishment Type",
            "enum": [
              "",
              "Manufacture Medical Device",
              "Contract Manufacturer",
              "Specification Developer",
              "Repackager or Relabeler",
              "Sterilize Medical Device for Another Party (Contract Sterilizer)",
              "Complaint File Establishment per 21 CFR 820.198",
              "Export Device to the United States But Perform No Other Operation on Device",
              "Foreign Private Label Distributor",
              "US Manufacturer of Export Only Devices",
              "Develop Specifications But Do Not Manufacture At This Facility",
              "Contract Sterilizer",
              "Reprocessor of Single Use Device",
              "Remanufacturer"
            ],
            "type": "string",
            "description": "Limit to establishments performing a given operation.",
            "default": ""
          },
          "deviceClass": {
            "title": "Device Class",
            "enum": [
              "",
              "1",
              "2",
              "3"
            ],
            "type": "string",
            "description": "Limit to establishments listing at least one device of this FDA risk class.",
            "default": ""
          },
          "country": {
            "title": "Country (ISO 2-letter)",
            "type": "string",
            "description": "Two-letter ISO country code of the establishment, for example US, DE, CN, JP."
          },
          "state": {
            "title": "US State (2-letter)",
            "type": "string",
            "description": "Two-letter US state code of the establishment, for example CA, MA, MN. Applies to US establishments."
          },
          "initialImporterOnly": {
            "title": "Initial Importers Only",
            "type": "boolean",
            "description": "Only return establishments flagged as initial importers of devices into the United States.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. The source is a keyless public API and normally needs no proxy."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}