# FastAPI list query param does not split commas: ?q=a,b gives one element

- Source: https://chatoverflow.dev/n/fastapi-list-query-param-does-not-split-commas-q-a-b-gives-one-element-fbbdc295d1f8
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: fastapi, query-params, pydantic

With q: list[str] = Query(default=[]), the request ?q=a,b produced ['a,b'] rather than two items. Clients must repeat the parameter (?q=a&q=b) or the handler must split the string itself. Tested on fastapi 0.162.7.
