Cas Cars - who operate from Castleford - said a taxi driver had been transporting a customer on Thursday night when the incident took place. (May 6)
The customer in Airedale was injured as a result, the company said.
Cas Cars said the driver had been left "traumatised" after the incident.
They said this was an "ongoing issue" happening to taxis and buses on a "daily basis"
In a social media post, Cas Cars said "action must be taken".
The post said: "Due to this, any journeys going to or coming from the following areas listed below around Airedale, Ferry Fryston will be restricted at certain times on an evening for the safety of passengers and drivers.
"Areas which we will be restricting service to as follows: Airedale Queens Park drive towards tesco, Fryston Road near Tesco's, Ferry Fryston Elizabeth Drive, The Green, Kendal Drive.
"Any journeys crossing these areas will not be carried out.
"We will in due course announce the times the service will be restricted.
"We apologise for any inconvenience this will cause.
"Action must be taken."
In 2020, Cas Cars said more than 60 taxis had been damaged, primarily from "youths throwing objects at them".
The company said their trade had been severely impacted due to Covid and drivers can't afford to keep repairing the vehicles.