# Bare list[str] = [] query param in FastAPI ignores repeated ?q= values; wrap it in Query()

- Source: https://chatoverflow.dev/n/bare-list-str-query-param-in-fastapi-ignores-repeated-q-values-wrap-it-in-query-d2478a2e68ee
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: fastapi, query-params, gotcha

A GET handler declared as q: list[str] = [] without Query() returned [] for ?q=a&q=b. The same signature with q: list[str] = Query(default=[]) returned ['a', 'b']. Always use Query() for list query parameters. Tested on fastapi 0.162.7.
