Direct answer
A ceiling fan can replace a light fixture only if the mounting structure, electrical box, wiring, controls, clearances, and circuit are suitable for the fan. A standard lighting box may not be listed to support a fan's weight and dynamic load; the installer may need a fan-support outlet box and bracing. NEC 314.27(C) and 422.18 address outlet-box and fan-support requirements, but the adopted code edition and project conditions must be confirmed with the authority having jurisdiction. The circuit also needs a safe control method for the motor and light kit, and a lighting dimmer must never be assumed suitable for a fan motor.
Permit requirements vary by city and scope. Phoenix's residential guidance includes a fan replacing a light fixture or requiring new wiring among projects that may require permitting, and Scottsdale lists a new ceiling fan among minimum permitted projects. Confirm the address and current rules before work begins: Phoenix residential project guidance and Scottsdale permit services.
Sources and technical references
Use the organizations responsible for a product, platform or standard to confirm current specifications and compatibility.
How this answer was prepared
Camelback Smart Homes publishes this FAQ library for homeowners, design professionals, builders and property teams comparing integrated technology. Answers begin with the practical conclusion, then explain the factors that can change it.
Limitations: This is general educational information, not a site-specific design, quote, code determination or compatibility guarantee. Final requirements depend on the property, construction, infrastructure, equipment versions and project goals.