Overview
The API supports multiple filtering mechanisms:- Filter-based searching: AND/OR logic for multi-value filters
- Date-based searching: Date ranges with various formats
- Location-based searching: Geographic queries (single point and polygons)
- Text searching: Full-text search across multiple fields
Filter-Based Searching
Some endpoints supportAND and OR filtering. The syntax used determines the outcome.
OR Logic (Comma-Separated)
Use comma-separated values for OR logic:option1 OR option2 OR both set to true will be returned.
AND Logic (Repeated Parameters)
Repeat the parameter for AND logic:option1 AND option2 set to true will be returned.
Combining AND and OR
You can combine both approaches:option1 OR option2 OR both) AND reference=123.
Real-World Examples
Filtering Applications by Type
OR logic - Get planning permission OR listed building consent:Filtering Public Comments
OR logic - Get objections OR neutral comments:Filtering Documents
Date-Based Searching
When searching with dates, follow these conventions:- Date fields (suffix
Date): Format asYYYY-MM-DD - DateTime fields (suffix
At): Format as ISO 8601 UTCYYYY-MM-DDTHH:MM:SSZ
Date-Only Ranges
Start date in
YYYY-MM-DD formatRequires: consultationEndDateTo must also be specifiedEnd date in
YYYY-MM-DD formatRequires: consultationEndDateFrom must also be specifiedDateTime Ranges
Start datetime in ISO 8601 UTC formatRequires:
receivedAtTo must also be specifiedEnd datetime in ISO 8601 UTC formatRequires: `receivedAtFrom” must also be specified
Common Date Parameters
| Parameter Pair | Type | Description |
|---|---|---|
receivedAtFrom / receivedAtTo | datetime | Application received date range |
validatedAtFrom / validatedAtTo | datetime | Validation date range |
publishedAtFrom / publishedAtTo | datetime | Publication date range |
withdrawnAtFrom / withdrawnAtTo | datetime | Withdrawal date range |
consultationEndDateFrom / consultationEndDateTo | date | Consultation end date range |
councilDecisionDateFrom / councilDecisionDateTo | date | Council decision date range |
appealLodgedDateFrom / appealLodgedDateTo | date | Appeal lodged date range |
appealDecisionDateFrom / appealDecisionDateTo | date | Appeal decision date range |
Date pairs are required: Both
From and To parameters must be specified together.Location-Based Searching
Single Point Search
Search within a radius of a specific point:Latitude coordinateRequires:
lng and radiusLongitude coordinateRequires:
lat and radiusSearch radius in metersConversion: To convert miles to meters:
miles / 0.000621371Address/Postcode Search
These parameters are geocoded into lat/lng coordinates:Postcode to geocodeRequires:
radiusAddress to geocodeRequires:
radiusRecommended Radius Values
Default radius values depend on the search context:| Use Case | Recommended Radius |
|---|---|
| Small-scale searches (ATMs, cafes) | 500–1,000 meters |
| Local searches (restaurants, businesses) | 2,000–5,000 meters |
| City-wide searches (delivery zones) | 10,000–20,000 meters |
| Regional searches (hospitals, large areas) | 50,000+ meters |
Multi-Point (Polygon) Search
GeoJSON Format
type: “Polygon” to specify geometry typecoordinates: Array of[longitude, latitude]pairs- Important: First and last coordinates must be identical to close the polygon
Simple Coordinate Pairs
Alternatively, pass coordinates as a comma-separated string:longitude1,latitude1,longitude2,latitude2,...
Text Search
Many endpoints support a generalquery parameter for full-text search:
Search term applied across multiple fieldsApplication endpoints: Searches
reference, description, and addressDocument endpoints: Searches name, type, and descriptionComment endpoints: Searches comment textField-Specific Search
Some endpoints support searching specific fields:Sorting Results
Combine filtering with sorting:Field to sort byCommon options:
receivedAtpublishedAtnameidcouncilDecisionDate
Sort orderOptions:
asc- Ascending orderdesc- Descending order
Complex Query Example
Combining multiple filter types:- Planning permission OR prior approval applications
- Currently in consultation stage
- Received in Q1 2024
- Within 5km of central London
- Sorted by received date (newest first)
- First page with 20 results
Next Steps
Endpoints
See filtering in action on specific endpoints
Response Structure
Understand the response format