# Live coding task: create a search api
We want to build a search api that finds similarities between products across the catalogs we host for marketplaces.
The API accepts a set of search terms and returns the products that matches said terms as well as its similarity score / accuracy / ranking.
A product consists of a id, title, description and price; both title and description should be taken into consideration for the relevancy score where title is more important.
## Task
- Create an api in typescript/javascript that accepts search terms over HTTP
- Keep a data structure of a set of products you can query with the search terms
- Return matched products as a json array including their relevancy score.
## Restrictions / guidelines
- Choose whatever ranking algorithms you best think matches the scenario
- Creating an index is optional!
- Any open source framework, component library or template starters can be used to achieve the task.
- Feel free to use google, chatgpt or anything else that you usually go to for work
- Using tooling such as git, docker testing or linting frameworks and other collaboration tools are optional but encouraged - same goes for things like unit tests.
- Ask questions as you see fit