Skip to content
Switch branches/tags
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Image Search Abstraction Layer 📷

This service accepts a search string as a parameter and will return a set of images relating to the given search string. The JSON response includes the image's URL, alt text, thumbnail link, and context link. You can also get a list of the most recently submitted search strings.

You can test it at

A Full Stack Javascript application built using MongoDB, Node.js and Express. An API Project for FreeCodeCamp.

Example Creation Usage

To retrieve a set of images, pass a search term to path[SEARCHTERM]

You can also paginate through the responses by adding a ? offset=[number] parameter to the URL path.

Valid Image search API call examples

Example Creation Output

  url: "",
  alt_text: "Puppy Socialization, Puppy Class, Training, Dogs, Dog Training ...",
  thumbnailLink: "",
  contextLink: ""
  url: "",
  alt_text: "Puppies Talking and Arguing With Their Humans Compilation - YouTube",
  thumbnailLink: "",
  contextLink: ""

To get list of the most recent submitted search strings

Make a request to:

To Run Project Locally


In order to run this project locally, you should have the following installed:

You should also:

  1. Create a Google Custom Search Engine Do not specify any sites to search but instead use the "Restrict Pages using Types" under the "Advanced options". For the most inclusive set, use the Schema: Thing. In your search engine settings, enable "Image search". Make a note of the CSE ID.

  2. Set up a Google Custom Search Engine API: Register a new app and enable Google Custom Search Engine API Google Developers Console. Make a note of the API key.

Installation & Startup

  1. Fork this repo

  2. Clone the fork

  3. Install Dependencies: $ npm install

  4. Run your MongoDB server: $ mongod --port 27017 --dbpath=./data

    Note: Your mongoDB is now running at: mongodb://localhost:27017/<your_database_name>

  5. Add a .env file to your project's root directory and set MONGO_CONNECTION_STRING to mongodb://localhost:27017/<your_database_name>

  6. You wil also need the CSE ID and your Google CSE API Keys in your .env file and name them CSE_ID and CSE_API_KEY, respectively

  7. Start the Server: $ node app.js

  8. Visit http://localhost:3000/

Enjoy! 💙


A Node.js REST API that allows you to search for images 📷



No releases published


No packages published