Hungry but don't know what you want?
Sick of scrolling endlessly through that white and orange page?
Then this is the API for you!
Just Eat Roulette will pick a semi-random* restaurant from Just Eat within your area for you, eliminating choice paralysis and letting you get food ASAP.
* Results are weighted on a combination of restaurant rating and expected delivery times
A demo of this API can be found at https://just-eat-roulette-api.fly.dev/
DISCLAIMER: This project is in no way affiliated with JUST EAT LIMITED or any subsidiaries
- Picks a restaurant to order from for you
- (
/restaurants/roulette?lat=<latitude>&lon=<longitude>&country_code=<see below>
)
- (
- Supports all countries where Just Eat is available
- Ireland (
ie
) - United Kingdom (
uk
) - Denmark (
dk
) - Spain (
es
) - Italy (
it
) - Norway (
no
) - Australia (
au
) - New Zealand (
nz
)
- Ireland (
- Supports pulling a list of all restaurants nearby with the
/restaurants
endpoint, sorting by- Average delivery time (
sort_method=delivery_time
) - Average rating (
sort_method=rating
)
- Average delivery time (
- OpenAPI documentation thanks to FastAPI (try
/docs
)
It's recommended to run this application using Docker like so:
$ docker build -t calemroelofs/just-eat-roulette:latest .
$ docker run -p 8000:8000 calemroelofs/just-eat-roulette:latest
For running locally, see Developing and contributing
Once the application is up an running, you can access the API documention via the /docs
endpoint.
However, to demonstrate some basic usage:
$ curl "http://localhost:8000/restaurants/roulette?lat=53.34979241036657&lon=-6.260254383087159&country_code=ie" | jq .
{
"name": "Honey Bun Bakery & Coffee",
"url": "https://www.just-eat.ie/restaurants-honey-bun-bakery-and-coffee-dublin-1",
"rating": 4.6,
"cuisines": [
"Sandwiches / Wraps",
"Coffee"
],
"delivery_time": 45
}
PRs are more than welcome! Please include tests for your changes :)
The package uses poetry to manage dependencies. To setup your dev env:
$ poetry install && poetry shell
To then run the application with hot reloading:
$ poetry run uvicorn just_eat_roulette.server.server:app --reload
To run the tests:
$ poetry run pytest