Skip to main content
The businesses list supports filtering by name, industry, country, and date range, as well as sorting by any column — including latest risk score. Filters and sort options are passed as URL query parameters, and HTMX updates the table without a full page reload when any value changes.

Query parameters

ParameterTypeDescription
namestringPartial, case-insensitive match on business name.
industrystringPartial, case-insensitive match on industry.
countrystringPartial, case-insensitive match on country.
date_fromstringISO 8601 date or datetime. Returns businesses created on or after this value.
date_tostringISO 8601 date or datetime. Returns businesses created on or before the end of this day.
sortstringColumn to sort by. Accepted values: name, industry, country, created_at, risk_score.
orderstringSort direction: asc or desc. Defaults to descending when omitted.
pageintegerPage number. Defaults to 1. Each page contains 15 results.

Available filters

Text filters

name, industry, and country all perform partial, case-insensitive matching. You do not need to supply an exact value — a partial string is enough.
/businesses?name=crypto
/businesses?industry=banking
/businesses?country=us

Date range filters

Use date_from and date_to to narrow results by creation date. Both accept ISO 8601 format. date_to is inclusive through the end of the specified day (23:59:59).
/businesses?date_from=2025-01-01
/businesses?date_from=2025-01-01&date_to=2025-06-30
Invalid date strings are silently ignored — the filter is skipped rather than returning an error.

Sorting

Use the sort parameter to choose a column and order to set the direction.
sort valueSorts by
nameBusiness name (alphabetical)
industryIndustry (alphabetical)
countryCountry (alphabetical)
created_atCreation timestamp
risk_scoreLatest evaluation score for each business
When sort=risk_score, businesses that have never been evaluated are placed last, regardless of sort direction. If an unrecognised sort value is provided, the list falls back to sorting by created_at.
/businesses?sort=risk_score&order=desc
/businesses?sort=created_at&order=asc
/businesses?sort=name&order=asc

Combining filters and sorting

All parameters can be combined freely. Filters are applied first, then sorting, then pagination.
/businesses?industry=crypto&sort=risk_score&order=desc
/businesses?country=usa&sort=name&order=asc&page=2
/businesses?name=tech&date_from=2024-01-01&sort=created_at&order=desc

Pagination

Results are returned 15 per page. Active filters apply across all pages — the page counter reflects only the businesses that match your current filters.
/businesses?industry=banking&page=2
When HTMX detects a filter or sort change, it sends an HX-Request header. The server responds with just the table rows partial rather than the full page, keeping navigation smooth and fast.

Build docs developers (and LLMs) love