Download the PHP package denason/wikipedia without Composer

On this page you can find all versions of the php package denason/wikipedia. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wikipedia

Wikipedia Laravel Package

📦 A powerful, developer-friendly Laravel package for accessing Wikipedia’s vast knowledge graph. This package bridges the gap between your Laravel application and structured/unstructured content on Wikipedia. Whether you're building educational tools, integrating intelligent search, or enriching content with real-time knowledge, this package gives you full programmatic access to article text, infoboxes, images, and metadata—across multiple languages.

No more dealing with raw API calls! With this package, you can use a fluent interface, full Laravel Facade support, and smart query enhancements to get exactly the data you want.

Features

Requirements

Installation

Usage Examples

You can use the global wiki() helper or dependency injection with the interface to access all features.

1. Get article summary

Output:

Albert Einstein was a German-born theoretical physicist who developed the theory of relativity, one of the two pillars of modern physics.

2. Get full HTML content

3. Get plain text content

4. Search with suggestions

5. Get article image

6. Get categories

7. Get infobox data

8. Get description (Wikidata)

Output:

region of spacetime where gravity is so strong that nothing — not even light — can escape

9. Use getInfo for advanced API call

Output:

Array of raw data based on specified parameters.

10. Use extract for custom property

Output:

Iran, also called Persia, is a country in Western Asia.

Available Methods

All methods are accessible via the wiki() helper or through dependency injection using the WikipediaInterface.

Method Description
summary(title, extra) Returns a short summary of the article.
html(title) Retrieves the full article content in HTML.
text(title) Retrieves the full article content as plain text.
search(query) Performs a search for related article titles.
suggest(query) Returns search autocomplete suggestions.
smart() Enables smart suggestion-based search. If a keyword isn't found, it will return the most relevant alternative suggestion automatically.
lang(code) Sets the query language (e.g., 'fa', 'en'). Use this when working with non-English titles. For example, for Persian: wiki()->lang('fa')->summary('دنا');
categories(title) Returns article categories as an array.
imageUrl(title) Returns the thumbnail image URL of the article.
url(title) Returns the full URL to the article.
raw(title) Returns the raw JSON data from Wikipedia API.
infoBox(title) Extracts structured data from the article’s infobox.
description(term) Returns the Wikidata description of the term.
extract(title, prop, extra) Custom extract call from Wikipedia API.
getInfo(title, prop, format, extra) General method for accessing Wikipedia API with advanced parameters.

📌 How to :

Dependency Injection Example

Instead of using the global wiki() helper, you can inject the WikipediaInterface directly into your controller, service, or job. This is especially useful when writing testable and decoupled code.

Example: Using WikipediaInterface in a Controller

This approach takes advantage of Laravel's service container to resolve the interface to its concrete implementation automatically.

-It also fully supports the Facades

License

This package is open-sourced software licensed under the MIT license.


All versions of wikipedia with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
illuminate/support Version ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package denason/wikipedia contains the following files

Loading the files please wait ....