SHANGHAI (Reuters) - The Shanghai city government has followed Beijing's lead and moved to restrict the usage of increasingly popular taxi booking apps, putting investments into the technology by foreign and Chinese companies at risk.

Taxi booking apps essentially allow customers and drivers to cooperate to break through government price controls on fares to negotiate a market price for transportation.

The apps usually allow users to bid for cabs by adding an additional flat fare but they do so at the expense of cab companies that provide dispatch services to the cabbies.

It has also resulted in complaints that Shanghai passengers are having increasing difficulty hailing cabs on the street, because many refuse to pick up customers paying normal fares.

Instead taxi drivers cruise the streets with their eye on a collection of cell phones mounted on their dashboards running different apps, all searching for fare bids.

Chinese internet giant Tencent Holdings Ltd has developed a function in its popular Wechat messaging system that allows customers to book and pay for cabs using its e-payment mechanism, and refunds a portion of the fare to the user.

Analysts say the app was developed in part to help Tencent compete with rival e-commerce giant Alibaba for a share of the online payment market, which Alibaba's Alipay product dominates. Alibaba has also invested in a popular cab-hailing app.

Neither Tencent nor Alibaba immediately responded to requests for comment.

The new regulations, published on the website of the Shanghai Municipal Transport and Port Authority, bans the use of taxi booking apps by cab drivers during rush hour periods and bans their use entirely by private vehicles licensed for hire.

This last regulation likely applies to services like U.S.-based Uber, which recently launched in Shanghai and other Chinese cities, and allows passengers to book private cars.

Uber did not immediately respond to requests for comment.

Drivers are also not allowed to use the apps while driving, and can be fined for refusing to pick up ordinary fares.

(Reporting by Pete Sweeney; Editing by Michael Perry)