SAHIL-SANGHVI(1)→ TERMINAL(1)

News Search App

A vanilla-JS front end searching live news via the GNews API.

project→ source

README

News Search App

A small vanilla JS front end that searches live news via the GNews REST API.

What it does

A single search box fetches matching articles from GNews and renders them as cards (title, source, snippet, link). Handles three states explicitly: default/empty landing content, no-results, and populated results.

Stack

HTML, CSS, vanilla JavaScript (fetch), no build step, no framework.

Running it

  1. Get a free API key at gnews.io
  2. Open homescript.js and set apiKey near the top of searchNews()
  3. Open home.html in a browser

Note

The original version of this had a live API key committed directly in the source — that key has been removed and the field left blank. Never commit API keys; use an environment variable or a build-time secret for anything beyond a toy front-end project like this.