whatisgithub

What is api?

pi-hole/api — explained in plain English

Analysis updated 2026-07-13 · repo last pushed 2020-03-01

170RustAudience · developerComplexity · 3/5DormantSetup · moderate

In one sentence

A Rust-based API that serves real-time ad-blocking statistics from Pi-hole by reading live data from its core engine. This archived version was meant to power the Pi-hole web interface and third-party dashboards.

Mindmap

mindmap
  root((repo))
    What it does
      Serves Pi-hole stats
      Reads live shared memory
      Replaces old API
      HTTP data feed
    Tech stack
      Rust
      HTTP endpoints
      Shared memory
      Pi-hole FTL
    Use cases
      Custom dashboards
      Mobile monitoring apps
      Third-party tools
    Status
      Archived
      Work in progress
      Moved to FTL repo
    Audience
      Pi-hole developers
      Tool builders
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build a custom dashboard that displays real-time ad-blocking stats from your Pi-hole.

USE CASE 2

Create a mobile app to monitor your home network's DNS query and blocking numbers.

USE CASE 3

Integrate Pi-hole statistics into a third-party network monitoring tool.

USE CASE 4

Develop an alternative web interface for Pi-hole using this standardized API.

What is it built with?

RustHTTPPi-hole FTLShared memory

How does it compare?

pi-hole/apidavidpdrsn/axum-live-viewazw413/ternos
Stars170214103
LanguageRustRustRust
Last pushed2020-03-012024-03-272026-03-19
MaintenanceDormantDormantMaintained
Setup difficultymoderatemoderatemoderate
Complexity3/53/54/5
Audiencedeveloperdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 1h+

Requires a running Pi-hole with FTL engine generating shared memory, plus Rust toolchain for building from source.

The explanation does not mention a license for this repository.

So what is it?

This repository contains the Pi-hole API, a component that lets other programs talk to Pi-hole and pull out statistics. Pi-hole itself is a popular tool that blocks ads and trackers across your entire home network. This API was designed to be the modern way that the Pi-hole web interface and other tools retrieve data, replacing an older, less flexible system. At a high level, the API works by reading shared memory that Pi-hole's core engine (called FTL) continuously generates. Think of it as a live dashboard data feed: FTL tracks all the DNS queries, blocks, and statistics as they happen, and the API simply reads that shared data and serves it up in a clean, standardized format over HTTP. This means any app or interface can request stats the same way it requests any web page. The people who would use this are primarily the developers building the Pi-hole web interface or third-party tools that want to display Pi-hole data. For example, someone building a mobile app to monitor their home network's ad-blocking stats, or a custom dashboard for a Raspberry Pi setup, would call this API to get real-time numbers. The README is focused on development setup, so it doesn't go into detail about the specific endpoints or data formats the API exposes. One notable thing: this particular repository has been archived, meaning development has moved elsewhere, the README points to a pull request in the FTL repository for more context. The project was written in Rust, a language known for performance and safety, which makes sense for a lightweight service running on devices like Raspberry Pis. However, since it's archived and was marked "work in progress," this version isn't being actively developed anymore.

Copy-paste prompts

Prompt 1
Show me how to set up the Pi-hole API locally so I can start fetching ad-blocking stats from FTL shared memory.
Prompt 2
Help me write a small Rust program that calls this Pi-hole API endpoint and prints total blocked queries to the console.
Prompt 3
Walk me through the architecture of how this API reads from Pi-hole FTL's shared memory and serves it over HTTP.
Prompt 4
I want to build a custom dashboard for my Raspberry Pi, show me how to query this API for real-time blocking statistics.

Frequently asked questions

What is api?

A Rust-based API that serves real-time ad-blocking statistics from Pi-hole by reading live data from its core engine. This archived version was meant to power the Pi-hole web interface and third-party dashboards.

What language is api written in?

Mainly Rust. The stack also includes Rust, HTTP, Pi-hole FTL.

Is api actively maintained?

Dormant — no commits in 2+ years (last push 2020-03-01).

What license does api use?

The explanation does not mention a license for this repository.

How hard is api to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is api for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.