{
  "openapi": "3.0.1",
  "info": {
    "title": "US B2B Leads: SEC Form D, NPI-2 & FDA Registries",
    "description": "Find organizations in SEC Form D filings, CMS NPI organization records and FDA device establishment registrations. Export structured records with source attribution from US federal APIs.",
    "version": "0.1",
    "x-build-id": "XdhEGTi5IFj0uq0ve"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rar_888~us-federal-b2b-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rar_888-us-federal-b2b-leads",
        "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/rar_888~us-federal-b2b-leads/runs": {
      "post": {
        "operationId": "runs-sync-rar_888-us-federal-b2b-leads",
        "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/rar_888~us-federal-b2b-leads/run-sync": {
      "post": {
        "operationId": "run-sync-rar_888-us-federal-b2b-leads",
        "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",
        "required": [
          "registries"
        ],
        "properties": {
          "registries": {
            "title": "Federal Registries",
            "type": "array",
            "description": "Official U.S. federal corporate registries to query: 'sec_form_d' (SEC EDGAR Form D private placement issuers), 'cms_npi_org' (CMS NPPES NPI-2 corporate clinics and healthcare organizations), and/or 'fda_establishments' (U.S. FDA openFDA registered medical device establishments).",
            "items": {
              "type": "string",
              "enum": [
                "sec_form_d",
                "cms_npi_org",
                "fda_establishments"
              ]
            },
            "default": [
              "sec_form_d",
              "cms_npi_org",
              "fda_establishments"
            ]
          },
          "query": {
            "title": "Organization / Sector Query",
            "type": "string",
            "description": "Optional organization name prefix or sector keyword (e.g. 'health', 'clinic', 'surgical'). In CMS NPPES NPI-2, queries of 2+ characters automatically use a prefix wildcard ('health*') to satisfy NPPES search rules; when left empty, CMS defaults to 'clinic*' while SEC and FDA return general corporate records.",
            "default": "health"
          },
          "state": {
            "title": "U.S. State Code (2-Letter)",
            "type": "string",
            "description": "Optional 2-letter U.S. postal state code (e.g. 'TX', 'CA', 'NY', 'MA') or empty '' for nationwide U.S. search.",
            "default": "TX"
          },
          "updatedSince": {
            "title": "Updated Since (date or relative window)",
            "type": "string",
            "description": "Optional cutoff for scheduled B2B lead monitoring. Accepts '', 'YYYY-MM-DD', an ISO-8601 UTC timestamp, or a relative window ('1d', '7d', '30d', '24h'). Filters SEC Form D by file_date and CMS NPI-2 by last_updated/enumeration_date; for FDA establishments (which publish reg_expiry_date_year), retains active status_code='1' registrations whose expiration year is at or after the cutoff year.",
            "default": ""
          },
          "maxItems": {
            "title": "Max Items (Global Run Cap)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum total number of corporate organization records to emit across the entire run (1 to 1000). Use 15 with maxItemsPerRegistry=5 to collect 5 + 5 + 5 across all three registries.",
            "default": 15
          },
          "maxItemsPerRegistry": {
            "title": "Max Items Per Registry",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of corporate organization records to emit per selected federal registry (1 to 500).",
            "default": 5
          },
          "proxyGroup": {
            "title": "Apify Proxy Group",
            "enum": [
              "DATACENTER",
              "RESIDENTIAL"
            ],
            "type": "string",
            "description": "Apify Proxy group to route requests through when proxy is enabled: 'DATACENTER' (default, fast and cost-effective) or 'RESIDENTIAL'.",
            "default": "DATACENTER"
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Apify Proxy settings for reliable rotation across requests (falls back cleanly to direct connection when running locally without proxy credentials).",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}