{
  "openapi": "3.0.1",
  "info": {
    "title": "TX Vendor Directory (CMBL) - HUB, SDV, Small Business",
    "description": "Texas Comptroller vendor database: the full CMBL vendor list (~45k, active + inactive) with HUB, SDV, small-business flags, performance scores, NIGP capability and VPTS grade. Filter by keyword, city, category.",
    "version": "0.0",
    "x-build-id": "3Nt4Ps1XA5V69czJD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/j0401~tx-cmbl-vendors/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-j0401-tx-cmbl-vendors",
        "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/j0401~tx-cmbl-vendors/runs": {
      "post": {
        "operationId": "runs-sync-j0401-tx-cmbl-vendors",
        "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/j0401~tx-cmbl-vendors/run-sync": {
      "post": {
        "operationId": "run-sync-j0401-tx-cmbl-vendors",
        "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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Only return vendors whose name, description, city or contact matches any keyword (case-insensitive). E.g. \"dental\", \"IT\", \"Houston\".",
            "items": {
              "type": "string"
            }
          },
          "activeOnly": {
            "title": "Active CMBL vendors only",
            "type": "boolean",
            "description": "Only return vendors currently active on the CMBL (excludes removed/expired registrations). Off returns the full active+inactive list.",
            "default": false
          },
          "hubApproved": {
            "title": "HUB-certified",
            "type": "boolean",
            "description": "Only return vendors with an approved HUB (Historically Underutilized Business) certification (HUB_STATUS = A).",
            "default": false
          },
          "sdv": {
            "title": "SDV",
            "type": "boolean",
            "description": "Only return Service-Disabled Veteran (SDV) vendors (SDV_FLAG = Y).",
            "default": false
          },
          "smallBusiness": {
            "title": "Small business",
            "type": "boolean",
            "description": "Only return vendors flagged as small business (SMALL_BUS_FLAG = Y).",
            "default": false
          },
          "qisv": {
            "title": "QISV",
            "type": "boolean",
            "description": "Only return Qualified Historically Underutilized Business / QISV vendors (QISV_FLAG = Y).",
            "default": false
          },
          "veteran": {
            "title": "Veteran-owned",
            "type": "boolean",
            "description": "Only return veteran-owned vendors (VETERAN = Y). Note: this field is currently unpopulated in the source file.",
            "default": false
          },
          "state": {
            "title": "State",
            "type": "string",
            "description": "Only return vendors in this state (2-letter code). Defaults to TX; leave blank for all states.",
            "default": "TX"
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "Only return vendors in this city (case-insensitive substring)."
          },
          "county": {
            "title": "County",
            "type": "string",
            "description": "Only return vendors in this county (case-insensitive substring)."
          },
          "categoryCodes": {
            "title": "Business categories",
            "type": "array",
            "description": "Only return vendors in these CMBL business categories: 01 Heavy Construction, 02 Building, 03 Special Trade, 04 Financial/Accounting, 05 Architectural/Engineering, 06 Other Services, 07 Commodities Wholesale, 08 Commodities Manufacturers, 09 Medical. E.g. [\"07\",\"08\"].",
            "items": {
              "type": "string"
            }
          },
          "nigpCodes": {
            "title": "NIGP codes",
            "type": "array",
            "description": "Only return active vendors classified under these NIGP codes. Accepts 3-digit class (\"005\"), class+item (\"005-14\"), or ESBD 5-digit codes (\"94828\", same format as tx-esbd records). Joins vnr_clas.csv on the vendor VID - no online search. E.g. [\"948\"] for Dental Services, [\"918\"] for Consulting.",
            "items": {
              "type": "string"
            }
          },
          "nigpKeyword": {
            "title": "NIGP description keywords",
            "type": "array",
            "description": "Find vendors by plain-language NIGP commodity words - matches class names and item descriptions in the official NIGP dictionary (comm_book.csv). E.g. [\"dental\"], [\"abrasives\"]. Resolves to NIGP codes internally.",
            "items": {
              "type": "string"
            }
          },
          "highwayDistricts": {
            "title": "Highway districts",
            "type": "array",
            "description": "Only return vendors flagged for these Texas highway districts (1-25) under a matching NIGP class. From the vnr_clas district bitmap.",
            "items": {
              "type": "string"
            }
          },
          "includeVpts": {
            "title": "Include VPTS performance grade",
            "type": "boolean",
            "description": "Attach each vendor's Texas Vendor Performance Tracking System (VPTS) grade and report count, linked by exact vendor ID (no name guessing). Vendors without a VPTS record are returned with vpts=null.",
            "default": true
          },
          "vptsOnly": {
            "title": "Only vendors with VPTS record",
            "type": "boolean",
            "description": "Only return vendors that have a VPTS performance record (exact vendor-ID link). Implies includeVpts.",
            "default": false
          },
          "hasPerformanceScore": {
            "title": "Has performance score",
            "type": "boolean",
            "description": "Only return vendors with at least one delivery/performance score (orders history on record).",
            "default": false
          },
          "minPerfScore": {
            "title": "Minimum performance score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Only return vendors whose performance scores (when present) are at least this value (0-100).",
            "default": 0
          },
          "maxResults": {
            "title": "Max vendor records",
            "minimum": 0,
            "type": "integer",
            "description": "Cap the number of vendor records pushed. Default 200 keeps the bill predictable (~$0.70). 0 = unlimited (the full CMBL is ~45k records - the bill can be high; only use 0 when you really need the whole list).",
            "default": 200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}