Skip to content

ajaz-rehman/search-engine-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

A Web Search Engine API built with NodeJS. It uses Google's PageRank algorithm for ranking links. You can can Crawl, Index, Rank & Search links using this API.

Prerequisites

  1. NodeJS
  2. Nodemon
  3. PostgreSQL

Project Setup

Install Dependencies

npm install

Run in Development Mode

npm run dev

Run in Production Mode

npm start

API Endpoints

Type Endpoint Description POST Data JSON
POST /crawl Add links for crawling. {"links": ["google.com"]}
GET /crawl?limit=10 Start crawling links.
PUT /rank Rank all crawled links.
GET /search?q=gmail&page=1&limit=10 Get relevant links for query.