Download the PHP package tims/zomato-php-sdk without Composer

On this page you can find all versions of the php package tims/zomato-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package zomato-php-sdk

zomato-php-sdk

PHP SDK for the Zomato Restaurant API (v2.1).

Covers the public endpoints documented by Zomato and mirrored in the community Postman collection.

Requirements

Installation

Authentication

Create an API key in the Zomato developer portal. Every request sends it as the user-key header.

Do not commit API keys. Prefer environment variables.

Quick start

Successful responses are decoded JSON arrays. Failed HTTP responses throw Tims\Zomato\ApiException.

Configuration

Constructor argument Default Purpose
$userKey required Zomato API key (user-key header)
$httpClient new Guzzle client Inject a custom Guzzle client (tests, middleware)
$guzzleOptions [] Extra Guzzle options when the default client is created
$baseUrl https://developers.zomato.com/api/v2.1 Override API base URL

Error handling

API reference

Base URL: https://developers.zomato.com/api/v2.1

Common

Method HTTP Path Notes
categories() GET /categories No query params
cities(array $params = []) GET /cities q, lat, lon, city_ids, count
collections(array $params = []) GET /collections city_id, lat, lon, count
cuisines(array $params = []) GET /cuisines city_id, lat, lon
establishments(array $params = []) GET /establishments city_id, lat, lon

Locations

Method HTTP Path Notes
geocode(float $lat, float $lon) GET /geocode Required lat, lon
locations(string $query, array $params = []) GET /locations Required query; optional lat, lon, count
locationDetails(int\|string $entityId, string\|EntityType $entityType) GET /location_details Required entity_id, entity_type

Restaurants

Method HTTP Path Notes
restaurant(int\|string $resId) GET /restaurant Required res_id
dailyMenu(int\|string $resId) GET /dailymenu Required res_id
reviews(int\|string $resId, array $params = []) GET /reviews Required res_id; optional start, count
search(array $params = []) GET /search See search parameters below

Search parameters

Param Type Description
entity_id int|string Location id
entity_type string|EntityType city, subzone, zone, landmark, metro, group
q string Keyword
start int Offset
count int Max results
lat / lon float Coordinates
radius float Radius in meters
cuisines string|array Cuisine ids
establishment_type int|string From /establishments
collection_id int|string From /collections
category string|array From /categories
sort string|Sort cost, rating, real_distance
order string|Order asc, desc

Arrays for cuisines / category are joined as comma-separated values.

Enums

Examples

Testing

Tests use Guzzle mock handlers; no live API key is required.

Laravel

A Laravel wrapper (laravel-zomato) will be published separately. It will read ZOMATO_USER_KEY / ZOMATO_BASE_URL from config and bind ZomatoClient in the container.

License

This package is open-sourced software licensed under the MIT license.

Copyright (c) 2026 TIMS.


All versions of zomato-php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-json Version *
guzzlehttp/guzzle Version ^7.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tims/zomato-php-sdk contains the following files

Loading the files please wait ...