{
  "openapi": "3.0.1",
  "info": {
    "title": "Texas Real Estate License Search (TREC) — Open Data",
    "description": "Every Texas real-estate broker and sales-agent license from TREC's official open-data feed (~322k records, ~188k active), refreshed daily. Holder name, license type & number, status, dates, sponsoring broker. Filter by name, type, status, number, or expiration date.",
    "version": "1.0",
    "x-build-id": "1f5bhxH2VSt5txvox"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/keeganlabs~tx-real-estate-licenses/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-keeganlabs-tx-real-estate-licenses",
        "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/keeganlabs~tx-real-estate-licenses/runs": {
      "post": {
        "operationId": "runs-sync-keeganlabs-tx-real-estate-licenses",
        "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/keeganlabs~tx-real-estate-licenses/run-sync": {
      "post": {
        "operationId": "run-sync-keeganlabs-tx-real-estate-licenses",
        "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": {
          "nameContains": {
            "title": "License holder name contains",
            "type": "string",
            "description": "Free-text substring matched against the license holder's full name (individual or company) and last name, case-insensitive. Example: SMITH, KELLER WILLIAMS."
          },
          "licenseType": {
            "title": "License type",
            "enum": [
              "",
              "Sales Agent",
              "Broker Individual",
              "Broker Company"
            ],
            "type": "string",
            "description": "TREC license type (exact match, case-insensitive). One of: 'Sales Agent', 'Broker Individual', 'Broker Company'.",
            "default": ""
          },
          "licenseNumber": {
            "title": "License number",
            "type": "string",
            "description": "TREC license number (partial match, case-insensitive). Sales agents end in -SA, individual brokers in -B, broker companies in -BB. Example: 854981-SA."
          },
          "status": {
            "title": "License status",
            "type": "string",
            "description": "Filter by status (partial match, case-insensitive). Values include: Active, Inactive, 'Expired less than 6 months', 'Expired more than 6 months', Revoked, Surrendered, Suspended, Deceased. Defaults to 'Active' unless 'Include all statuses' is on."
          },
          "includeAllStatuses": {
            "title": "Include all statuses (not just Active)",
            "type": "boolean",
            "description": "If true and no explicit status is set, returns license holders of every status (active, inactive, expired, revoked, etc.).",
            "default": false
          },
          "expiresFrom": {
            "title": "License expires on/after (YYYY-MM-DD)",
            "type": "string",
            "description": "Only include licenses whose expiration date is on or after this date (ISO YYYY-MM-DD). Useful for renewal-marketing lead lists. Applied to the normalized expiration date."
          },
          "expiresTo": {
            "title": "License expires on/before (YYYY-MM-DD)",
            "type": "string",
            "description": "Only include licenses whose expiration date is on or before this date (ISO YYYY-MM-DD)."
          },
          "originalIssuedFrom": {
            "title": "Originally licensed on/after (YYYY-MM-DD)",
            "type": "string",
            "description": "Only include holders whose original license date is on or after this date (ISO YYYY-MM-DD). Useful for finding newly-licensed agents for recruiting."
          },
          "originalIssuedTo": {
            "title": "Originally licensed on/before (YYYY-MM-DD)",
            "type": "string",
            "description": "Only include holders whose original license date is on or before this date (ISO YYYY-MM-DD)."
          },
          "maxRecords": {
            "title": "Maximum records",
            "minimum": 1,
            "maximum": 350000,
            "type": "integer",
            "description": "Hard cap on the number of license records to return. The full dataset is ~322k rows (~188k Active).",
            "default": 5000
          },
          "socrataAppToken": {
            "title": "Socrata app token (optional)",
            "type": "string",
            "description": "Optional data.texas.gov / Socrata application token to raise API throttling limits. Not required — the API works without one."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}