
Filters and Searches
Filters and searches in the Locations API
There are two main ways to find particular locations within the Locations API: filters and searches.
Filters will look for a particular value in one particular attribute. You need to have the entire value of the attribute – there are no partial matches. Use these if you have a pretty good idea what you’re looking for.
Searches will look for locations that contain one or more words from your query in one or more of their attributes. Use these if you’re not quite sure what you’re looking for.
Both filters and searches are passed along with your request as query parameters.
On this page
Basic attribute filters
A basic attribute filter looks like this:
GET /locations/locations?filter[referenceId]=LCMSN_0050
The prefix filter marks this parameter as a filter. This is always followed by a set of square brackets, inside which is the name of the attribute you want to apply the filter to.
You can use basic filters like this on any attribute, and you can use as many as you like at once. For example:
GET /locations/locations?filter[type]=Building
&filter[addresses.municipality]=Madison
…would get you all the buildings in the city of Madison.
If you specify a single attribute multiple times, you’ll get all the locations that match any of the values you specified. For example:
GET /locations/locations?filter[referenceId]=LCMSN_0050
&filter[referenceId]=LCMSN_0002
&filter[referenceId]=LCMSN_0042
…would get you all the locations with a reference ID of LCMSN_0050, LCMSN_0002, or LCMSN_0042.
Hierarchy attributes
You may want to get all of the sublocations within a particular location. To do this, filter on one of the superior location attributes:
| Attribute name | Description |
| superiorLocationId | A location’s immediate superior location. For example, the immediate superior location of a room is either the building it’s in, or the floor it’s part of. Because some but not all locations use floors, this is not a good way to get all the rooms within a building. |
| superiorBranchCampusId | If the location is part of a branch campus, this will point to the branch campus it belongs to. For locations not belonging to a branch campus, this will be empty. |
| superiorCampusId | The campus (not branch campus) this location belongs to. For locations belonging to branch campuses, this value will point to the parent campus of their branch. |
| superiorBuildingId | The building or non-building this location belongs to. Empty for buildings, non-buildings, campuses, and branch campuses. |
| superiorFloorId | The floor this location belongs to. Empty for all locations except rooms. |
For example, to get all the locations at the Rock County branch of UW-Whitewater:
GET /locations/locations?filter[superiorBranchCampusId]=LCWTW_RCK
Or, to get all the rooms that can be used as work spaces within Bascom Hall:
GET /locations/locations?filter[superiorBuildingId]=LCMSN_0050
&filter[type]=Room
&filter[usages]=WORK SPACE
Date filters
There are several date attributes available for locations:
- inactiveDate
- workdayCreatedOn
- workdayDateOfLastChange
Sometimes there’s one exact value you’re looking for, but often you’ll need to filter for dates after or before a particular date, or from a range of dates. For this, you can use filter operators.
?filter[inactiveDate:greaterThan]=2026-01-01
^^^^^^^^^^^^ ^^^^^^^^^^^
Attribute name Operator
Operators are placed inside the filter square brackets and are separated from the attribute name by a colon. Only date fields support operators. The operators available are:
- greaterThan
- greaterThanOrEqual
- lessThan
- lessThanOrEqual
- between
The value must be a date, or in the case of the between operator, two dates separated by a comma. Examples:
# locations inactivated before 2025
GET /locations/locations?filter[inactiveDate:lessThan]=2025-01-01
# locations updated since Feb 1
GET /locations/locations?filter[wdDateOfLastChange:greaterThanOrEqual]=2026-02-01
# locations created during January 2026
GET /locations/locations?filter[wdCreatedOn:between]=2026-01-01,2026-01-31
Searches
Searches are a less restrictive way of finding locations. If you know part of the name of a building, or part of any attribute, you can search for it:
GET /locations/locations?search=Bascom
This will return all locations with “Bascom” anywhere in any of their attributes. This would include Bascom Hall, but also North Hall and South Hall (since their address is on Bascom Mall).
If you include multiple terms in a single search string, they will be searched individually, meaning these queries are equivalent:
GET /locations/locations?search=Bascom Babcock
GET /locations/locations?search=Bascom&search=Babcock
Searches also provide minor typo tolerance, which is helpful for formatting differences. For example, this query would match a document with an addresses.line1 of “100 Main St.” or “100 Main St”:
GET /locations/locations?search=100 main st
In this case, you could expect to see locations with an addresses.line1 of “100 Main St” or “100 Main St. Unit 3” returned, but you could also see “200 Other St” (due to both addresses containing “st”), “100 Some Ave” (both contain “100”), or a location with a buildingNumber of “100”.
While this may be undesirable for some use cases, it is helpful for abbreviations and typo tolerance. For instance, if you need to find locations at “300 Fort Havens Landing Court Extension” and use the search parameter like so:
GET /locations/locations?search=300 fort haven landin corut xtension
Despite the typos and potential mismatch with postal abbreviations, it would match locations at:
- 300 Fort Havens Landing Court Extension
- 300 Frt Hvn Lndg Ct Ext
- 300 Ft Haven Lndng Ct Extn
- 300 Fort Haven Landing Crt Extnsn
In addition, any of the above combinations of postal abbreviations would also return the desired location.
If you wish to only find locations that contain the entire value in at least 1 string field, you can enclose them in quotation marks like so:
GET /locations/locations?search="100 main st"
In this case, you could expect to see locations with an addresses.line1 of “100 Main St”, “100 Main St. Unit 3”, etc. and a location with a buildingName of “100 Main Street Temporary Offices”, but not “200 Other St”, “100 Some Ave”, or a location with a buildingNumber of “100”.
Because the typo tolerance is based on edit distance, the search term still needs to at least be close to the value of an attribute. This will return no results because it’s not close enough to “Bascom” to match anything:
GET /locations/locations?search=Basc
Order of Evaluation
The order of evaluation is as follows:
- All
searchparameters will be combined with a logical OR operator. - If used in conjunction with the
filterquery parameter, thesearchparameters will be combined with thefilterparameters with a logical AND operator.