A simple Go command-line tool to search and retrieve professional license data from the Texas Open Data Portal. All search parameters support partial matching and are case-insensitive for maximum flexibility.
This tool queries the Texas government's public API to fetch information about various professional licenses issued in Texas. It supports flexible filtering with partial, case-insensitive matching across multiple fields including license type, business county, license subtype, business name, owner name, license number, and expiration date.
- Go 1.16 or higher
- A Texas Open Data Portal App Token (free registration required)
- Clone or download this repository
- Install dependencies:
go mod init texas-license-fetcher go mod tidy
- Visit data.texas.gov
- Create a free account
- Generate an App Token from your account settings
- Set the token as an environment variable:
export APP_TOKEN=your_app_token_here
go run main.go [flags]| Flag | Description | Example |
|---|---|---|
-e |
License expiration date (partial match) | -e "2025" or -e "12/16" |
-n |
License number (partial match) | -n "90210" or -n "TACLA" |
-t |
License type (partial, case-insensitive) | -t "plumb" finds "Plumber" |
-c |
Business county (partial, case-insensitive) | -c "harris" finds "HARRIS" |
-st |
License subtype (partial, case-insensitive) | -st "reg" finds "REG" |
-bn |
Business name (partial, case-insensitive) | -bn "bob" finds "BOB'S PLUMBING" |
-on |
Owner name (partial, case-insensitive) | -on "smith" finds "SMITH, JOHN" |
-timeout |
HTTP request timeout in seconds | -timeout 60 |
-limit |
Maximum records to retrieve | -limit 100 |
Search for all A/C Technicians in Harris County:
go run main.go -t "a/c" -c "harris"Find licenses for businesses with "plumbing" in the name:
go run main.go -bn "plumbing" -limit 10Search by partial owner name:
go run main.go -on "smith" -limit 50Find licenses expiring in 2025:
go run main.go -e "2025" -limit 20Search for specific license numbers:
go run main.go -n "TACLA" -limit 10Combine multiple search criteria:
go run main.go -t "plumb" -c "harris" -on "bob" -limit 25- Partial Matching: All text searches support partial matches - searching for "plumb" will find "Plumber", "Plumbing", etc.
- Case-Insensitive: Search terms are automatically converted to match the database format - "harris" finds "HARRIS"
- Multiple Criteria: Combine any search parameters to narrow results
- Flexible Date Search: Search expiration dates by year, month/year, or full date
- License Number Search: Find licenses by partial license numbers or prefixes
The tool outputs each license record as formatted JSON, followed by a total count. Example output:
{
"license_type": "A/C Technician",
"license_number": "TACLA12345",
"business_county": "HARRIS",
"business_name": "Cool Air Solutions",
"owner_name": "John Doe",
"mailing_address_county": "HARRIS",
"license_expiration_date_mmddccyy": "12/31/2024",
"license_subtype": "REG",
"continuing_education_flag": "Y"
}- Pagination Support: Automatically handles large result sets by fetching data in chunks
- Graceful Shutdown: Responds to Ctrl+C (SIGINT) and SIGTERM signals
- Formatted Output: Pretty-printed, colorized JSON output for easy reading
- Flexible Search: Partial, case-insensitive matching across all text fields
- Result Limiting: Control the maximum number of records retrieved
- Configurable Timeout: Set custom HTTP request timeouts
The tool will exit with an error message if:
- The
APP_TOKENenvironment variable is not set - The API returns a non-200 status code
- Network connectivity issues occur
- Invalid JSON is returned from the API
This tool queries the Texas Professional Licensing dataset available at:
- API Endpoint:
https://data.texas.gov/resource/7358-krk7.json - Dataset: Professional Licensing Data
- Update Frequency: Regular updates from Texas state agencies
github.com/tidwall/pretty- For JSON formatting and colorization
This project is provided as-is for educational and informational purposes. Please respect the Texas Open Data Portal's terms of service and rate limits.
"Didn't find required APP_TOKEN in env"
- Make sure you've set the
APP_TOKENenvironment variable with your Texas Open Data Portal token
"API returned a non-200 status code"
- Check your internet connection
- Verify your App Token is valid
- Ensure your search parameters are correctly formatted
No results returned
- Try broadening your search criteria - remember all searches are partial matches
- Check for typos in your search terms
- Try searching with fewer criteria to see if records exist
- For license numbers, try searching with just the prefix (e.g., "TACLA" instead of full number)