piholeControl Pi-hole v6 DNS ad blocker: check status, view stats, enable/disable block, and analyze blocked domains via API.
Install via ClawdBot CLI:
clawdbot install baanish/piholeControl your Pi-hole DNS ad blocker via the Pi-hole v6 API.
Set your Pi-hole API configuration in Clawdbot config:
skills:
entries:
pihole:
apiUrl: "https://pi-hole.local/api" # v6 API path
apiToken: "your-app-password-here" # Get from Pi-hole Admin
insecure: false # Set to true for self-signed certs
Alternatively, set environment variables:
export PIHOLE_API_URL="https://pi-hole.local/api"
export PIHOLE_API_TOKEN="your-app-password-here"
export PIHOLE_INSECURE="false"
http://pi-hole.local/adminapiToken# Check Pi-hole status
"pihole status"
# Turn off ad blocking
"pihole off"
# Turn on ad blocking
"pihole on"
# Disable for 5 minutes (for a site that needs ads)
"pihole disable 5m"
# Disable for 30 minutes
"pihole disable 30"
# See what was blocked in the last 30 minutes
"pihole blocked"
# See blocked domains in last 10 minutes (600 seconds)
"pihole blocked 600"
# Show statistics
"pihole stats"
POST /api/auth
Content-Type: application/json
{"password":"your-app-password"}
Response:
{
"session": {
"sid": "session-token-here",
"validity": 1800
}
}
GET /api/dns/blocking
Headers: sid: <session-token>
Response:
{
"blocking": "enabled" | "disabled",
"timer": 30 // seconds until re-enable (if disabled with timer)
}
POST /api/dns/blocking
Headers: sid: <session-token>
Content-Type: application/json
Enable:
{"blocking":true}
Disable:
{"blocking":false}
Disable with timer (seconds):
{"blocking":false,"timer":300}
GET /api/stats/summary
Headers: sid: <session-token>
Response:
{
"queries": {
"total": 233512,
"blocked": 23496,
"percent_blocked": 10.06
},
"gravity": {
"domains_being_blocked": 165606
},
"clients": {
"active": 45
}
}
GET /api/queries?start=-<seconds>
Headers: sid: <session-token>
Response:
{
"queries": [
{
"domain": "example.com",
"status": "GRAVITY",
"time": 1768363900,
"type": "A"
}
]
}
Pi-hole v6 introduced significant API changes:
| Feature | v5 API | v6 API |
|---------|----------|----------|
| Base URL | /admin/api.php | /api |
| Auth | Token in URL/headers | Session-based |
| Status | ?status | /api/dns/blocking |
| Stats | ?summaryRaw | /api/stats/summary |
| Queries | ?recentBlocked | /api/queries |
| Whitelist | Supported via API | Not available via API |
Important: Domain whitelisting is no longer available via the v6 API. You must whitelist domains through the Pi-hole Admin UI.
{
"apiUrl": "https://pi-hole.example.com/api",
"apiToken": "...",
"insecure": false
}
{
"apiUrl": "https://pi-hole.local/api",
"apiToken": "...",
"insecure": true
}
The insecure flag adds the -k option to curl to bypass certificate validation.
apiToken matches your Pi-hole app passwordapiUrl is correct (must end in /api)insecure: truecurl, jq (installed on most Unix systems)Generated Mar 1, 2026
Home users can easily monitor and control their Pi-hole ad blocker to manage network-wide ad blocking. They can temporarily disable blocking for specific tasks, like accessing a site that requires ads, and view stats to see how many ads are blocked daily, enhancing privacy and browsing speed.
Small businesses can use this skill to enforce ad and malware blocking across their office network, improving security and productivity. IT staff can quickly disable blocking for troubleshooting or updates and analyze blocked domains to identify potential threats or unwanted traffic.
Schools or universities can integrate Pi-hole control to manage content filtering on campus networks, blocking ads and distracting sites. Administrators can schedule temporary disables for educational purposes and monitor query activity to ensure compliance with usage policies.
In smart home or IoT environments, this skill helps manage DNS filtering for connected devices to block ads and trackers. Users can check status and stats to optimize network performance and temporarily disable blocking for device updates or compatibility testing.
Remote workers or IT support teams can control Pi-hole instances from afar to manage ad blocking on home or branch office networks. They can enable/disable blocking as needed and troubleshoot issues by checking blocked domains, ensuring seamless connectivity for work applications.
Offer basic Pi-hole control features for free, with premium tiers providing advanced analytics, longer history retention, and multi-instance management. Revenue comes from monthly subscriptions, targeting tech-savvy users and small businesses seeking enhanced network insights.
Sell licenses to larger organizations for integrating Pi-hole control into their existing IT management systems, with custom support and SLA guarantees. Revenue is generated through one-time license fees or annual contracts, focusing on businesses with complex network needs.
Partner with MSPs to bundle this skill as part of their service offerings for clients, providing remote network management and monitoring. Revenue comes from partnership fees or a percentage of MSP subscription sales, leveraging existing customer bases in IT services.
💬 Integration Tip
Ensure the Pi-hole API URL ends with '/api' and use environment variables for secure token storage to avoid hardcoding credentials in configuration files.
Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.
Security-first skill vetting for AI agents. Use before installing any skill from ClawdHub, GitHub, or other sources. Checks for red flags, permission scope, and suspicious patterns.
Perform a comprehensive read-only security audit of Clawdbot's own configuration. This is a knowledge-based skill that teaches Clawdbot to identify hardening opportunities across the system. Use when user asks to "run security check", "audit clawdbot", "check security hardening", or "what vulnerabilities does my Clawdbot have". This skill uses Clawdbot's internal capabilities and file system access to inspect configuration, detect misconfigurations, and recommend remediations. It is designed to be extensible - new checks can be added by updating this skill's knowledge.
Use when reviewing code for security vulnerabilities, implementing authentication flows, auditing OWASP Top 10, configuring CORS/CSP headers, handling secrets, input validation, SQL injection prevention, XSS protection, or any security-related code review.
Security check for ClawHub skills powered by Koi. Query the Clawdex API before installing any skill to verify it's safe.
Scan Clawdbot and MCP skills for malware, spyware, crypto-miners, and malicious code patterns before you install them. Security audit tool that detects data exfiltration, system modification attempts, backdoors, and obfuscation techniques.