Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bingSearch.js

Microsoft Cognitive, Bing Search API Wrapper

Bing Search.js Is a jquery plugin to use the Bing Search API, you can use this plugin for free.

alt tag

Requirements

- jquery-1.11.1.min.js or higher

Instalation

  • Include bingSearch.js library
<script type="text/javascript" src="bingSearch.js"></script>

How to use?

Just call mokki function in your javascript

    $.bingSearch({
        apiKey: 'YOUR_API_KEY',
        keyword: $('.keyword').val(),
        onSuccess: function(response) {
            var data = response.webPages.value;
            $('.result').html('');
            for (var i = 0; i < data.length; i++) {
                let situs = data[i];
                let element = `
                	<div class="siteList">
                 	<a href="${situs.url}" target="_blank">${situs.name}</a> <br/>
                 	<span class="displayUrl">${situs.displayUrl}</span> <br/> 
                 	${situs.snippet}
                	</div>
                `;
                $('.result').append(element);
            }
        }
    });

About

Microsoft Cognitive, Bing Search API Wrapper, Bing Search.js Is a jquery plugin to use the Bing Search API, you can use this plugin for free.

Topics

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages