{
  "openapi": "3.0.1",
  "info": {
    "title": "TDI Agent Lookup - Bulk Texas Insurance License Search",
    "description": "Look up Texas insurance agents, adjusters, escrow officers and agencies by name, license number, NPN, city, ZIP or license category. Returns clean, structured profiles with license status, expiration dates and coverage lines.",
    "version": "1.0",
    "x-build-id": "UopYO1IJklgFbR1ni"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/lofomachines~tdi-agent-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-lofomachines-tdi-agent-lookup",
        "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/lofomachines~tdi-agent-lookup/runs": {
      "post": {
        "operationId": "runs-sync-lofomachines-tdi-agent-lookup",
        "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/lofomachines~tdi-agent-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-lofomachines-tdi-agent-lookup",
        "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": [
          "searchScope"
        ],
        "properties": {
          "searchScope": {
            "title": "What do you want to look up?",
            "enum": [
              "agents",
              "agencies",
              "all"
            ],
            "type": "string",
            "description": "Choose whether to return licensed people, licensed businesses, or both.",
            "default": "agents"
          },
          "names": {
            "title": "Names",
            "type": "array",
            "description": "Full or partial names to look up. Works with people (e.g. John Smith) and businesses (e.g. Allstate). Word order does not matter.",
            "items": {
              "type": "string"
            }
          },
          "licenseNumbers": {
            "title": "License numbers",
            "type": "array",
            "description": "Texas license numbers to look up.",
            "items": {
              "type": "string"
            }
          },
          "npnNumbers": {
            "title": "NPN numbers",
            "type": "array",
            "description": "National Producer Numbers (NPN) to look up.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Limit results to these cities, for example Houston, Dallas or Austin.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Two-letter state codes. Texas licences are also held by out-of-state professionals, so leave this empty to include them.",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes",
            "type": "array",
            "description": "Full or partial ZIP codes. A partial code such as 770 matches every ZIP starting with those digits.",
            "items": {
              "type": "string"
            }
          },
          "licenseCategories": {
            "title": "License categories",
            "type": "array",
            "description": "Limit results to specific lines of business. Leave empty to include every category.",
            "items": {
              "type": "string",
              "enum": [
                "property_casualty",
                "life_health",
                "adjusters",
                "public_adjusters",
                "title_escrow",
                "surplus_lines",
                "managing_general_agents",
                "specialty_limited",
                "pre_need",
                "county_mutual",
                "risk_management",
                "life_settlement",
                "reinsurance"
              ],
              "enumTitles": [
                "Property & Casualty",
                "Life, Accident & Health",
                "Claims Adjusters",
                "Public Adjusters",
                "Title & Escrow",
                "Surplus Lines",
                "Managing General Agents",
                "Specialty & Limited Lines",
                "Pre-Need",
                "County Mutual",
                "Risk Management",
                "Life Settlement",
                "Reinsurance"
              ]
            }
          },
          "licenseStatus": {
            "title": "License status",
            "enum": [
              "active",
              "expiring",
              "expired",
              "any"
            ],
            "type": "string",
            "description": "Return only currently valid licences, licences that are about to lapse, lapsed licences, or everything.",
            "default": "active"
          },
          "expiringWithinDays": {
            "title": "Expiring within (days)",
            "minimum": 1,
            "maximum": 730,
            "type": "integer",
            "description": "Only used when the license status is set to \"Expiring soon\".",
            "default": 90
          },
          "issuedAfter": {
            "title": "Licensed on or after",
            "type": "string",
            "description": "Only include licences issued on or after this date. Great for finding newly licensed professionals."
          },
          "oneProfilePerLicensee": {
            "title": "One row per licensee",
            "type": "boolean",
            "description": "Combine every licence held by the same person or business into a single, complete profile. Turn this off to get one row per individual licence.",
            "default": true
          },
          "sortBy": {
            "title": "Sort results by",
            "enum": [
              "newest",
              "expiring",
              "tenure",
              "name"
            ],
            "type": "string",
            "description": "Controls the order in which results are collected and saved.",
            "default": "newest"
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of rows to save. Lower values finish faster and cost less.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}