GSA / GSA/data.gov

Catalog-API: /api/location/{id} geometry field is double-serialized -- returns JSON string instead of object

Open
#5,903 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
The `geometry` field in the `/api/location/{location_id}` response is returned as a JSON-encoded string rather than a parsed GeoJSON object.

## Steps to Reproduce
GET https://catalog.data.gov/api/location/6

## Expected Behavior
`geometry` field returns a GeoJSON object directly.

## Actual Behavior
`geometry` is a JSON string containing escaped GeoJSON -- developers must call `JSON.parse()` on the value to use it, which is unexpected and undocumented.

## Example
```json
{
"id": "6",
"geometry": "{\"type\":\"MultiPolygon\",\"coordinates\":[...]}"
}
Notes
Confirmed April 27, 2026 on location ID 6 (Colorado). Needs testing on additional location IDs to confirm consistent behavior.

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.