DEV Community

Cover image for Bucket list REST API
Krishna Pankhania
Krishna Pankhania

Posted on • Edited on

Bucket list REST API

Intro

I have developed this API to suggest bucket list places, adventures, foods, and many more things(Upcoming) that you can add to your bucket list!

The project is being hosted by Heroku and the code is on GitHub.

Inspiration

I always look forward to doing some new activities and I am a fan of bucket lists so I started this project. I have dug up the internet to find the best items to add in each and every category. I have added all credits to websites and photo sources, most of the photos are from Unsplash and some blogs. Please collaborate with me on GitHub if you have any new categories in mind or want to add new features to this API.

Demo

https://bucket-list-public-api.herokuapp.com
Enter fullscreen mode Exit fullscreen mode

API Base URL

https://bucket-list-public-api.herokuapp.com/api
Enter fullscreen mode Exit fullscreen mode

Endpoints

Endpoint Parameters Description
/ - Returns a random suggestion from place,adventure.
/suggest-place - Returns a random suggestion from places.
/suggest-adventure - Returns a random suggestion from adventures
/suggest-food - Returns a random suggestion from foods
/all page=page-number limit=number-of-suggestions-to-return Returns all places,adventures.
/all-places page=page-number limit=number-of-suggestions-to-return Returns all places.
/all-adventures page=page-number limit=number-of-suggestions-to-return Returns all adventures.
/all-foods page=page-number limit=number-of-suggestions-to-return Returns all foods.

Example Responses:

Get random suggestions.

https://bucket-list-public-api.herokuapp.com/api
Enter fullscreen mode Exit fullscreen mode
{
    "name": "Walk along the Great Wall of China",
    "details": "The Great Wall of China is a good reason for the existence of the Bucket List! It’s an astonishing relic of China’s history, and it’s a must for many travelers and tourists around...",
    "image":"https://images.unsplash.com/photo-1508804185872-d7badad00f7d?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1170&q=80",
    "imageCredit":"https://unsplash.com/",
    "from":"https://tourscanner.com/blog/bucket-list-ideas/",
    "category":"adventure"
}
Enter fullscreen mode Exit fullscreen mode

Get all suggestions with pagination.
https://bucket-list-public-api.herokuapp.com/api/all?page=1&limit=3

[
    {
    "name": "Get stunned by the Great Pyramid of Giza",
    "details": "The Great Pyramid of Giza defines bucket...",
    "image": "https://images.unsplash.com/photo-1564554860010-304d58f6edb1?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1026&q=80",
    "imageCredit": "https://unsplash.com/",
    "from": "https://tourscanner.com/blog/bucket-list-ideas/",
    "category":"adventure"
  },
  {
    "name": "Walk along the Great Wall of China",
    "details": "The Great Wall of China is a good reason...",
    "image": "https://images.unsplash.com/photo-1508804185872-d7badad00f7d?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1170&q=80",
    "imageCredit": "https://unsplash.com/",
    "from": "https://tourscanner.com/blog/bucket-list-ideas/",
    "category":"adventure"
  },
  {
    "name": "Explore Petra",
    "details": "Jordan’s rose-colored sandstone city is an extraordinary...",
    "image": "https://images.unsplash.com/photo-1580834341580-8c17a3a630ca?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1074&q=80",
    "imageCredit": "https://unsplash.com/",
    "from": "https://tourscanner.com/blog/bucket-list-ideas/",
    "category":"adventure"
  }
]
Enter fullscreen mode Exit fullscreen mode

Github

https://github.com/krishnapankhania/bucket-list-public-api
Enter fullscreen mode Exit fullscreen mode

Top comments (0)