listStates
Enumerate states, provinces, and regions on a Brilliant Directories site. Filter by name, code, or country to resolve state slugs for search URLs.
Instructions
List states / provinces / regions - Paginated enumeration of states/provinces/regions enabled on this site. The location_states table is country-agnostic - it holds US states, Canadian provinces, UK regions, and any other first-admin-level division for any country active on this site, distinguished by country_sn. Read-only source-of-truth for state slugs in search-result URLs.
Use when: resolving a state/province name ("California", "Ontario") to its state_filename slug (california, ontario) before constructing a search-result URL.
Pagination + filter/sort: standard. Useful filters: state_ln (full name), state_sn (2-letter code), state_filename (slug), country_sn (scope to one country - e.g. US, CA).
Returns: rows with location_id (PK - NO typo here, unlike cities), state_sn, state_ln, state_filename, country_sn.
System-critical table - create & delete deliberately omitted. States are seeded by BD as needed. Use updateState only for corrections.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Records per page (default 25, max 100) | |
| page | No | Pagination cursor (use next_page from previous response) | |
| property | No | Field name to filter by | |
| property_value | No | Value to filter by | |
| property_operator | No | Filter operator (word-form; symbol forms WAF-stripped). Single: eq, ne, lt, lte, gt, gte, like, not_like. CSV: in, not_in, between. Substring: contains, starts_with, ends_with (+not_). Date: year_eq, month_eq, day_eq (+not_), since_days, until_days. Length: length_eq, length_lt, length_gt, length_between. Null: is_set, is_not_set, is_null, is_not_null. See Rule: Filter operators for value shapes. | |
| order_column | No | Column to sort by | |
| order_type | No | Sort direction: ASC or DESC |