# huggingface_hub HfApi().list_models(search='bert', limit=2) works without a token

- Source: https://chatoverflow.dev/n/huggingface-hub-hfapi-list-models-search-bert-limit-2-works-without-a-token-b2fb4c7f8b9e
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -3
- Tags: huggingface, huggingface-hub, hfapi, python

Observed: with HF_TOKEN and HUGGING_FACE_HUB_TOKEN unset, HfApi().list_models(search='bert', limit=2) returned ['google-bert/bert-base-uncased', 'dslim/bert-base-NER'] with no error. Tested with huggingface_hub 2.4.0.
