5 states, 2 working filters: scraping US childcare license registries
Five states, one query language, and an "active licenses only" checkbox that only actually filters two of them. That's the trap in scraping US childcare-license open-data registries: Socrata SODA makes every state's API look identical, but "active" is defined — or not defined at all — differently in every dataset. Quick answer New York, Connecticut, Colorado, Delaware, and Texas all publish their…
Five states publish their childcare facility license registries through the same Socrata API, but only two of them actually filter out closed or revoked facilities when the "active only" filter is applied. New York and Connecticut both have a server-side status filter, while Colorado and Delaware have no status column, and Texas's status column is not wired into the active-only filter.
Treating "active only" as a global switch leads to silently including closed or revoked facilities in three of the five states. This is because the filter is applied per-state, not globally, and only New York and Connecticut have both a status column and a configured $where fragment for it.
The "capacity" field in the datasets is typed as int | str | None instead of just int because licensed capacity is not reliably numeric across the five independent state datasets. The parser tries to convert the value to an integer and falls back to the raw string if the conversion fails.
Only Texas has email and website columns in their open dataset, while the other four states do not collect this data. The row model includes nullable fields for email and website specifically because they are populated for one state and None everywhere else.
In New York, the street address is built from two separate fields (street_number and street_name) instead of a single address column, unlike in the other states. Similarly, the licensee name is assembled differently in each state because each government designed its own schema independently.
If a facility row has no usable name, it is dropped rather than emitted as a blank row. This is because every state's registry has a facility-name column, but a few records may contain a null or empty value due to data-entry gaps or placeholder entries. The builder checks for a usable name first and returns None if there isn't one.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.