--- title: Ajax (remote data) metadata: description: Select2 provides extensive support for populating dropdown items from a remote data source. taxonomy: category: docs process: twig: true never_cache_twig: true --- Select2 comes with AJAX support built in, using jQuery's AJAX methods. In this example, we can search for repositories using GitHub's API: **In your HTML:** ``` ``` **In your Javascript:** ``` $('.js-example-data-ajax').select2({ ajax: { url: 'https://api.github.com/search/repositories', dataType: 'json' // Additional AJAX parameters go here; see the end of this chapter for the full code of this example } }); ``` You can configure how Select2 searches for remote data using the `ajax` option. Select2 will pass any options in the `ajax` object to jQuery's `$.ajax` function, or the `transport` function you specify. >>> For **remote data sources only**, Select2 does not create a new `