{
  "openapi": "3.0.1",
  "info": {
    "title": "Texas TREC License Search Scraper",
    "description": "Search Texas Real Estate Commission (TREC) license-holder records: real estate brokers, sales agents, inspectors, easement/right-of-way agents, appraisers, and appraisal management companies. Search by name or license number, get status, expiration date, and sponsoring broker.",
    "version": "1.0",
    "x-build-id": "K64NJyMiLObpkeb8i"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~texas-trec-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-texas-trec-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/crawlerbros~texas-trec-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-texas-trec-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/crawlerbros~texas-trec-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-texas-trec-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",
        "required": [
          "mode",
          "licenseCategory"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "byName",
              "byLicenseNumber"
            ],
            "type": "string",
            "description": "How to look up TREC licenses.",
            "default": "byName"
          },
          "licenseCategory": {
            "title": "License category",
            "enum": [
              "brokerSalesAgent",
              "inspector",
              "easementAgent",
              "appraiser",
              "appraisalManagementCompany",
              "all"
            ],
            "type": "string",
            "description": "Which TREC-regulated profession to search. `All categories` searches every category in turn (slower, uses more of your `maxItems` budget per category).",
            "default": "brokerSalesAgent"
          },
          "nameQuery": {
            "title": "License holder / business name (mode=byName)",
            "type": "string",
            "description": "Matches the license holder's full name, first name, or last name (e.g. `Smith` or `Star Realty`). Case-insensitive partial match. Optional if `licenseType` is set — leaving it blank then browses all licenses of that type.",
            "default": "Smith"
          },
          "licenseNumber": {
            "title": "License number (mode=byLicenseNumber)",
            "type": "string",
            "description": "The TREC license number, e.g. `854692-SA` (Sales Agent), `490032-BB` (Broker Company). TREC suffixes license numbers by type, so pair with `licenseCategory` for an exact match."
          },
          "licenseType": {
            "title": "Filter by license type",
            "enum": [
              "",
              "Broker Company",
              "Broker Individual",
              "Sales Agent",
              "Apprentice",
              "Real Estate",
              "Professional",
              "Easement ROW - Business License",
              "Easement ROW - Individual License",
              "Certified Residential",
              "Certified General",
              "Licensed Residential",
              "Temporary Non-Resident",
              "Trainee",
              "Appraisal Management Company (AMC) License"
            ],
            "type": "string",
            "description": "Only emit licenses of this exact TREC-defined license type. The valid set depends on `licenseCategory` (e.g. `Sales Agent`/`Broker Individual`/`Broker Company` for Broker/Sales Agent; `Certified Residential`/`Trainee`/etc. for Appraiser). Leave unset for all types within the chosen category.",
            "default": ""
          },
          "statusFilter": {
            "title": "Filter by license status",
            "enum": [
              "",
              "Active",
              "Archived",
              "Canceled",
              "Closed - Upgraded",
              "Deceased",
              "Deleted",
              "Denied",
              "Expired",
              "Expired less than 6 months",
              "Expired more than 6 months",
              "Inactive",
              "Inactive - Suspended",
              "Inactive - Unsupervised",
              "Military",
              "Probated Revocation - Active",
              "Probated Revocation - Inactive",
              "Probated Suspension - Active",
              "Probation - Active",
              "Probation - Inactive",
              "Relinquished",
              "Revoked",
              "Surrendered",
              "Suspended",
              "Upgraded",
              "Withdrawn"
            ],
            "type": "string",
            "description": "Only emit licenses with this exact TREC-published status. Leave unset for all statuses.",
            "default": ""
          },
          "activeOnly": {
            "title": "Active licenses only",
            "type": "boolean",
            "description": "When enabled, only emit licenses whose status is exactly `Active` (a shortcut for `statusFilter: Active`).",
            "default": false
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "licenseNumber",
              "fullName",
              "expirationDate"
            ],
            "type": "string",
            "description": "Order results are fetched/emitted in. Defaults to license number.",
            "default": "licenseNumber"
          },
          "sortDirection": {
            "title": "Sort direction",
            "enum": [
              "asc",
              "desc"
            ],
            "type": "string",
            "description": "Ascending or descending order for `sortBy`.",
            "default": "asc"
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Hard cap on emitted license records. When `licenseCategory` is `all`, this cap applies across all categories combined.",
            "default": 20
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}