Socket
Book a DemoInstallSign in
Socket

wikipedia-summary

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wikipedia-summary

A simple Node.js wrapper to fetch Wikipedia summaries in multiple languages.

latest
Source
npmnpm
Version
1.0.5
Version published
Weekly downloads
4
-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

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

  • GitHub Issues: Report Bugs or Request Features
  • Give a Star: ⭐ If you love this package, show some support!

🚀 Now go explore the world of knowledge! 🌍

Keywords

wikipedia

FAQs

Package last updated on 26 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts