GSA / GSA/data.gov

Catalog-API: spatial_within=true with no spatial_geometry returns results instead of an error

Open
#5,901 0 comments 0 reactions 0 assignees View on GitHub
API bug Catalog
Dominant language
Python
Stars
1.1k
Forks
200
Avg merge
4h 56m
Merged PRs (30d)
5

Description

## Description
Passing `spatial_within=true` without a `spatial_geometry` parameter returns results rather than a validation error.

## Steps to Reproduce
GET https://catalog.data.gov/search?spatial_within=true

## Expected Behavior
HTTP 422 -- `spatial_within` is meaningless without `spatial_geometry`.

## Actual Behavior
HTTP 200 with results, parameter effectively ignored.

## Notes
Confirmed April 27, 2026. May be intentional -- engineering to confirm. At minimum docs should note that `spatial_within` has no effect without `spatial_geometry`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.