{"id":45293868,"url":"https://github.com/dnlserrano/tomato","last_synced_at":"2026-02-21T03:30:52.963Z","repository":{"id":57556269,"uuid":"160796991","full_name":"dnlserrano/tomato","owner":"dnlserrano","description":"Elixir wrapper for the Zomato API","archived":false,"fork":false,"pushed_at":"2018-12-30T19:39:44.000Z","size":63,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-24T02:33:05.621Z","etag":null,"topics":["elixir","exunit","httpoison","mox","poison","zomato"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dnlserrano.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-07T08:49:09.000Z","updated_at":"2023-05-13T18:26:39.000Z","dependencies_parsed_at":"2022-09-02T12:50:51.479Z","dependency_job_id":null,"html_url":"https://github.com/dnlserrano/tomato","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dnlserrano/tomato","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnlserrano%2Ftomato","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnlserrano%2Ftomato/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnlserrano%2Ftomato/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnlserrano%2Ftomato/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dnlserrano","download_url":"https://codeload.github.com/dnlserrano/tomato/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnlserrano%2Ftomato/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29672704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T03:11:15.450Z","status":"ssl_error","status_checked_at":"2026-02-21T03:10:34.920Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elixir","exunit","httpoison","mox","poison","zomato"],"created_at":"2026-02-21T03:30:52.072Z","updated_at":"2026-02-21T03:30:52.956Z","avatar_url":"https://github.com/dnlserrano.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tomato\n\n![](logo.png)\n\nElixir wrapper for the Zomato API ([documentation](https://hexdocs.pm/tomato/0.1.1/Tomato.html#summary)).\n\n## Installation\n\nFirst, add `tomato` to your mix.exs dependencies:\n\n```elixir\ndef deps do\n  [\n    {:tomato, \"~\u003e 0.1.1\"}\n  ]\nend\n```\n\nThen, update your dependencies:\n\n```elixir\n$ mix deps.get\n```\n\n## Configuration\n\nConfigure the Zomato API key and URI:\n\n```elixir\n# config/config.exs\n\nconfig :tomato,\n  zomato_api_key: System.get_env(\"ZOMATO_API_KEY\"),\n  zomato_api_uri: System.get_env(\"ZOMATO_API_URI\")\n```\n\n## Usage\n\nUsage follows the existing Zomato API endpoints.\n\nParameters for the various `Tomato` functions should be passed as a map (e.g., `%{city_id: 82}`).\n\n`Tomato.geocode/2` and `Tomato.restaurant/1` are the exceptions:\n\n- `Tomato.geocode/2` receives latitude and longitude, respectively;\n- `Tomato.restaurant/1` receives a restaurant ID.\n\n### Categories\n\n- `GET /categories`\n\n```elixir\niex\u003e Tomato.categories()\n{:ok,\n [\n   %Tomato.Category{id: 1, name: \"Delivery\"},\n   %Tomato.Category{id: 2, name: \"Dine-out\"},\n   %Tomato.Category{id: 3, name: \"Nightlife\"},\n   ...\n ]}\n```\n\n### Cities\n\n- `GET /cities`\n\n```elixir\niex\u003e Tomato.cities(%{q: \"Lisbon\"})\n{:ok,\n [\n   %Tomato.City{\n     country_id: 164,\n     country_name: \"Portugal\",\n     id: 82,\n     is_state: 0,\n     name: \"Greater Lisbon\",\n     state_code: \"\",\n     state_id: 0,\n     state_name: \"\"\n   },\n   ...\n ]}\n```\n\n### Collections\n\n- `GET /collections`\n\n```elixir\niex\u003e Tomato.collections(%{city_id: 82})\n{:ok,\n [\n   %Tomato.Collection{\n     description: \"The best new places in town\",\n     id: 29,\n     image_url: \"https://b.zmtcdn.com/data/collections/957133b8ebf50487c00cbadea54d6461_1516725996.jpg\",\n     res_count: 26,\n     share_url: \"http://www.zoma.to/c-82/29\",\n     title: \"Newly Opened\",\n     url: \"https://www.zomato.com/grande-lisboa/best-new-restaurants?utm_source=api_basic_user\u0026utm_medium=api\u0026utm_campaign=v2.1\"\n   },\n   ...\n ]}\n```\n\n### Cuisines\n\n- `GET /cuisines`\n\n```elixir\niex\u003e Tomato.cuisines(%{city_id: 82})\n{:ok,\n [\n   %Tomato.Cuisine{id: 152, name: \"African\"},\n   %Tomato.Cuisine{id: 283, name: \"Alentejana\"},\n   %Tomato.Cuisine{id: 1, name: \"American\"},\n   ...\n ]}\n```\n\n### Establishments\n\n- `GET /establishments`\n\n```elixir\niex\u003e Tomato.establishments(%{city_id: 82})\n{:ok,\n [\n   %Tomato.Establishment{id: 241, name: \"Snack Bar\"},\n   %Tomato.Establishment{id: 16, name: \"Casual Dining\"},\n   %Tomato.Establishment{id: 278, name: \"Wine Bar\"},\n   ...\n ]}\n```\n\n### Geocode\n\n- `GET /geocode`\n\n_Note: Geocode is one of the few responses which is not wrapped in a custom entity (unlike, e.g., cuisines, which map to `Tomato.Cuisine`)._\n\n```elixir\niex\u003e Tomato.geocode(38.733563, -9.144688)\n{:ok,\n %{\n   \"link\" =\u003e \"https://www.zomato.com/grande-lisboa/saldanha-restaurants\",\n   \"location\" =\u003e %{\n     \"city_id\" =\u003e 82,\n     \"city_name\" =\u003e \"Greater Lisbon\",\n     \"country_id\" =\u003e 164,\n     \"country_name\" =\u003e \"Portugal\",\n     \"entity_id\" =\u003e 82041,\n     \"entity_type\" =\u003e \"subzone\",\n     \"latitude\" =\u003e \"38.7337710000\",\n     \"longitude\" =\u003e \"-9.1448500000\",\n     \"title\" =\u003e \"Saldanha\"\n   },\n   \"nearby_restaurants\" =\u003e [\n     %{\n       \"restaurant\" =\u003e %{\n         ...\n       }\n     },\n     ...\n   ],\n   ...\n }}\n```\n\n### Restaurant\n\n- `GET /restaurant`\n\n```elixir\niex\u003e Tomato.restaurant(18714697)\n{:ok,\n %Tomato.Restaurant{\n   average_cost_for_two: 30,\n   cuisines: \"Pizza\",\n   currency: \"€\",\n   deeplink: \"zomato://restaurant/18714697\",\n   events_url: \"https://www.zomato.com/grande-lisboa/valdo-gatti-bairro-alto-lisboa/events#tabtop?utm_source=api_basic_user\u0026utm_medium=api\u0026utm_campaign=v2.1\",\n   featured_image: \"https://b.zmtcdn.com/data/pictures/7/18714697/2d7c3dbbb17e70490e68f0db2fba5c29.jpg\",\n   has_online_delivery: 0,\n   has_table_booking: 0,\n   id: \"18714697\",\n   is_delivering_now: 0,\n   location: %Tomato.Location{\n     address: \"Rua do Grémio Lusitano, 13, Bairro Alto, Lisboa\",\n     city: \"Lisboa\",\n     country_id: 164,\n     latitude: \"38.7133620825\",\n     locality: \"Bairro Alto\",\n     longitude: \"-9.1440753266\",\n     zipcode: \"\"\n   },\n   menu_url: \"https://www.zomato.com/grande-lisboa/valdo-gatti-bairro-alto-lisboa/menu?utm_source=api_basic_user\u0026utm_medium=api\u0026utm_campaign=v2.1\u0026openSwipeBox=menu\u0026showMinimal=1#tabtop\",\n   name: \"Valdo Gatti\",\n   photos_url: \"https://www.zomato.com/grande-lisboa/valdo-gatti-bairro-alto-lisboa/photos?utm_source=api_basic_user\u0026utm_medium=api\u0026utm_campaign=v2.1#tabtop\",\n   price_range: 3,\n   thumb: \"https://b.zmtcdn.com/data/pictures/7/18714697/2d7c3dbbb17e70490e68f0db2fba5c29.jpg?fit=around%7C200%3A200\u0026crop=200%3A200%3B%2A%2C%2A\",\n   url: \"https://www.zomato.com/grande-lisboa/valdo-gatti-bairro-alto-lisboa?utm_source=api_basic_user\u0026utm_medium=api\u0026utm_campaign=v2.1\",\n   user_rating: %Tomato.Rating{\n     aggregate_rating: \"4.5\",\n     rating_color: \"3F7E00\",\n     rating_text: \"Excellent\",\n     votes: \"124\"\n   }\n }}\n```\n\n### Search\n\n- `GET /search`\n\n```elixir\niex\u003e Tomato.search(%{entity_type: \"city\", entity_id: 82, start: 0, count: 5, cuisines: \"82\", sort: \"rating\", order: \"desc\"})\n{:ok,\n [\n   %Tomato.Restaurant{\n     average_cost_for_two: 50,\n     cuisines: \"Pizza, Italian\",\n     currency: \"€\",\n     deeplink: \"zomato://restaurant/8212322\",\n     ...\n   },\n   ...\n ]}\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/dnlserrano/tomato.\n\n## License\n\n`tomato` is released under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnlserrano%2Ftomato","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdnlserrano%2Ftomato","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnlserrano%2Ftomato/lists"}