custom wikipedia search engine

How we can create a custom search engine for searching Wikipedia Infos? Solution: See this Custom Wikipedia Search Engine With JavaScript CSS, Wiki Search API Based.

Previously I have shared some search input animation, but this is an API based real search engine for getting Wikipedia’s results. Basically, Wikipedia is a free, open content online encyclopedia created which can be created or edit by any users. When we need info about any things, we go and check Wikipedia first. We also can create a search engine for only wiki Infos and articles, because it provides an API for creating.

Today you will learn to create a Wiki Search API based search engine. Basically, there is a heading for telling about the search engine, a search input, and a button with an icon. The search input has also an animation effect on click, and the button for open random Wikipedia feeds. At first, it will show results about programming, you can change this in JS functions. When you will click on the search button, it will expand and becomes an input field. Then you can type any topic and press enter for getting the result.

So, Today I am sharing  Custom Wikipedia Search Engine With JavaScript and CSS. This program is based on the Wikipedia search API, which is provided by the wiki team for development purposes. There I have used many JS libraries like jQuery, bootstrap, solid.js, etc. This means it is not a pure JavaScript program. This program has AJAX-based search results without reloading.

If you are thinking now how this search program actually is, then see the preview given below.

Preview Of Wiki Search API Based Program

See this video preview to getting an idea of how this program looks like.

Live Demo

Now you can see this visually, also you can see it live by pressing the button given above. If you like this, then get the source code of its.

You May Also Like:

Custom Wikipedia Search Engine With JavaScript CSS Source Code

Before sharing source code, let’s talk about it. First I have created a main div named container and placed a heading, a search input, and a button inside it. The layout is based on Bootstrap, as we know bootstrap creating responsive elements. In the HTML file, I have linked external files like CSS, JS, and other libraries’ CDN link.

Now using CSS I have placed all the elements in the right place, as you can see in the preview. With CSS I gave basic styles like size, position, margin, padding, color values, etc. There I have used CSS @Keyframe command for creating the search input animation, it is also handled by jQuery codes. I have used :after :before and transform command for creating the elements.

JS handling here the two main features of the program, one is search input toggle and the other is getting results using API over URL parameters. There is AJAX for getting data without load or reload. You can get results on typing like KeyUP function, you don’t have to press enter to get the result. I have created dynamic elements like div, heading, text in the JS file after getting results using jQuery .append command.

Left all other things you will understand after getting the codes, I can’t explain all in writing. For creating this program you have to create 3 files. First file for HTML, second File for CSS, and the third file for JavaScript. Follow the steps to creating this without any error.

index.html

Create an HTML file named ‘index.html‘ and put these codes given below.

style.css

Now create a CSS file named ‘style.css‘ and put these codes given here.

function.js

The final step, create a JavaScript file named ‘function.js‘ and put the codes.

That’s It. Now you have successfully created Custom Wikipedia Search Engine With JavaScript CSS, Wiki Search API Based Program. If you have any doubt or questions comment down below.

Thanks For Visiting, Keep Visiting.

LEAVE A REPLY

Please enter your comment!
Please enter your name here