Reviving this topic as it is one of the first search results.
I’ve accomplished this by using the API functionality and remove/add blocklists using REST commands. Hope this is useful for others reading this.
Tip: I’ve created a new profile in NextDNS just for testing purposes.
I’m using aabbccdd as example. Also, under your profile, make sure you have an API Key.
Step 1: Get your current blocklist IDs:
Run this on your cli:
curl -X GET "https://api.nextdns.io/profiles/aabbccdd/privacy/blocklists" -H "X-Api-Key: <YOUR API KEY>"
This is my output:
{"data":[{"id":"nextdns-recommended","name":null,"website":null,"description":null,"entries":88667,"updatedOn":"2026-03-25T19:31:40.000Z"},{"id":"oisd","name":"OISD","website":"https://oisd.nl","description":"Internet's #1 domain blocklist. Blocks Ads, Mobile Ads, Phishing, Malvertising, Malware, Tracking, Telemetry, CryptoJacking, Analytics, Spyware, Ransomware, Exploit, Fraud, Abuse, Scam, Spam, Hijack, Misleading Marketing.","entries":335581,"updatedOn":"2026-03-27T14:15:24.000Z"},{"id":"easyprivacy","name":"EasyPrivacy","website":"https://easylist.to","description":"EasyPrivacy is an optional supplementary filter list that completely removes all forms of tracking from the internet, including web bugs, tracking scripts and information collectors, thereby protecting your personal data.","entries":46344,"updatedOn":"2026-03-27T14:47:24.000Z"}]}
Note down the different IDs.
This is the nextdns.yaml package I’ve created:
rest_command:
nextdns_disable_blocking:
url: "https://api.nextdns.io/profiles/aabbccdd/privacy"
method: patch
headers:
X-Api-Key: !secret nextdns_api_key
Content-Type: application/json
payload: '{"blocklists": [{"id":"easyprivacy"}]}'
nextdns_enable_blocking:
url: "https://api.nextdns.io/profiles/aabbccdd/privacy"
method: patch
headers:
X-Api-Key: !secret nextdns_api_key
Content-Type: application/json
payload: '{"blocklists": [{"id":"nextdns-recommended"}, {"id":"oisd"}, {"id":"easyprivacy"}]}'
script:
disable_nextdns_30min:
alias: "Disable NextDNS Blocking (30 min)"
sequence:
- service: rest_command.nextdns_disable_blocking
- delay: "00:30:00"
- service: rest_command.nextdns_enable_blocking
nextdns_disable_blocking_manual:
alias: "Disable NextDNS Blocking (manual)"
sequence:
- service: rest_command.nextdns_disable_blocking
nextdns_enable_blocking_manual:
alias: "Enable NextDNS Blocking (manual)"
sequence:
- service: rest_command.nextdns_enable_blocking
Of course an entry should be in your secret.yaml file for nextdns_api_key, alternatively add your API key instead of “!secret nextdns_api_key”.
Unfortunately you cannot refresh the configuration because of the rest_command entries so a full Home-Assistant is required.
This will remove the OISD nextdns-recommended blocklists, leaving easyprivacy in place.
Use it to your advantage 