FilterLists

FilterLists

Security

Lists of filters for adblockers and firewalls. Make a simple call to the api and it will list all blockers and firewalls in a JSON file. Easy, simple and fast way to integrate ads / lucrative content to your website.

Visit API

📚 Documentation & Examples

Everything you need to integrate with FilterLists

🚀 Quick Start Examples

FilterLists Javascript Examplejavascript
// FilterLists API Example
const response = await fetch('https://filterlists.com/api', {
    method: 'GET',
    headers: {
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);

Introduction to FilterLists API Docs

FilterLists is a website that provides a publicly available API for accessing data on ad-blocking filters. This API can be used to integrate ad-blocking functionality into your website or application. In this blog post, we will explore the FilterLists API documentation and provide some useful JavaScript example code.

API Examples

Search for Filter Lists

To search for lists based on specific criteria, you can use the GET /search endpoint.

const searchUrl = 'https://filterlists.com/api/v1/search';
const searchTerm = 'adblock';
const resultsPerPage = 10;
const pageNumber = 1;
const queryParams = `?q=${searchTerm}&per_page=${resultsPerPage}&page=${pageNumber}`;

fetch(searchUrl + queryParams)
  .then(response => response.json())
  .then(data => console.log(data));

In the above example, we are searching for all filter lists that contain the term "adblock" and returning 10 results per page on page 1.

Get a List by ID

To get information on a specific list, you can use the GET /lists/:id endpoint.

const listUrl = 'https://filterlists.com/api/v1/lists';
const listId = 1;

fetch(listUrl + `/${listId}`)
  .then(response => response.json())
  .then(data => console.log(data));

In the above example, we are getting information on the filter list with ID 1.

Get a List's Rules

To get the rules for a specific list, you can use the GET /lists/:id/rules endpoint.

const ruleUrl = 'https://filterlists.com/api/v1/lists';
const listId = 1;

fetch(ruleUrl + `/${listId}/rules`)
  .then(response => response.json())
  .then(data => console.log(data));

In the above example, we are getting the rules for the filter list with ID 1.

Conclusion

In this blog post, we have covered some of the basic examples of how to use the FilterLists API to search for filter lists, get information on a specific list, and get a list's rules. These examples should give you a good starting point for integrating the FilterLists API into your own website or application. For more detailed documentation, please refer to the official FilterLists API documentation on the website.

📊 30-Day Uptime History

Daily uptime tracking showing online vs offline minutes

Jun 15Jun 17Jun 19Jun 21Jun 23Jun 25Jun 27Jun 29Jul 1Jul 3Jul 5Jul 7Jul 9Jul 11Jul 1404008001440Minutes
Online
Offline

Related APIs in Security