Google is expanding its same-day delivery service to Manhattan and West Los Angeles as the Internet-search giant competes with Amazon.com for consumer purchases.

The company launched Google Shopping Express last year in the San Francisco Bay area. The service lets people order online and pay for packaged foods and other items, such as toys and diapers, from physical stores operated by retailers including Costco, Target and Walgreen. The products are delivered to consumers’ residences by small vans within hours.

Google is offering the service free for the first six months in each metro area; after that, it will charge a fee of about $4.99 per store.

Google and Amazon.com, the world’s largest Internet retailer, are competing to be shoppers’ primary online destination and merchants’ preferred place to reach those consumers.

Amazon has become a popular first stop on the Web and smartphones for people searching for products, taking away some lucrative search advertising business from Google. That competition has intensified as Amazon has introduced faster delivery and more food and consumer packaged goods that people buy more often.

That gives Amazon more control over the delivery process and the products stored in its warehouses. But Google saves the cost of building warehouses, by working with existing stores.

Google is bringing its delivery service to all of Manhattan with Babies “R” Us, Costco, Fairway Market, L’Occitane, Staples, Target, and Walgreen. The company said in a blog that it also wants to bring Shopping Express to Queens and Brooklyn in the coming months.