When Facebook was searching for another New York office, one big enough to fit as many as 6,000 workers, more than double the number it currently employs in the city, it had one major demand: It needed the space urgently.

So after the company settled on Hudson Yards, the vast mini-city taking shape on Manhattan’s Far West Side, existing tenants were told to move and a small army of construction workers quickly began to revamp the building even before a lease had been signed.

Facebook’s push to accommodate its booming operations is part of a rush by the West Coast technology giants to expand in New York City. The rapid growth is turning a broad swath of Manhattan into one of the world’s most vibrant tech corridors.

Four companies — Amazon, Apple, Facebook and Google — already have big offices along the Hudson River, from Midtown to Lower Manhattan, or have been hunting for new ones in recent months, often competing with one another for the same space.