wikipedia-summary

1.0.5 • Public • Published

Wikipedia Summary 📚

Free to use! 📖 A simple Node.js wrapper to fetch Wikipedia summaries in multiple languages.

NPM Version
Downloads
License


📦 Installation

npm install wikipedia-summary

🚀 Features

✅ Fetches Wikipedia summaries easily.
✅ Supports multiple languages (en, tr, fr, de, etc.).
✅ Returns title, description, extract, page URL, and image.
✅ Lightweight and easy to use.


🔥 Quick Start

const { getSummary } = require("wikipedia-summary");

async function main() {
  const summary = await getSummary("Albert Einstein", "en");
  console.log(summary);
}

main();

📌 API Method

getSummary(topic, language)

Fetches a short summary from Wikipedia.

Parameters:

  • topic (string): The topic to search for.
  • language (string, optional): Wikipedia language code (default: "en").

Returns:
A JSON object with:

  • title: The page title.
  • description: A short description.
  • extract: A brief summary.
  • pageUrl: The Wikipedia page link.
  • imageUrl: The main image of the page (if available).

📜 License

This project is licensed under the MIT License.


🌟 Support & Contact

🚀 Now go explore the world of knowledge! 🌍

Package Sidebar

Install

npm i wikipedia-summary

Weekly Downloads

14

Version

1.0.5

License

MIT

Unpacked Size

5.23 kB

Total Files

4

Last publish

Collaborators

  • utkuberkaykoc