Open source · 2026 – present Project 5 of 20
AniPHP
AniList in PHP: GraphQL queries built in code, results as objects.
Visit the site
Verified site status: Up, 35 ms response,
At a glance
- Role
- Author
- Period
- 2026 – present
- Status
- Live
- Technologies
- 5 technologies
AniPHP wraps AniList's public GraphQL API. Instead of hand-written query strings and digging through nested arrays, developers get a fluent query builder and results as typed objects. The library comes with documentation at aniphp.lausman.dev covering installation, a first query and a live playground.
Why it is technically interesting
- The query builder. Variables are declared with a type from an enum (Int, String, [String]), and operations and nested fields are put together with method calls. A variable type cannot be misspelled, and the query stays readable inside PHP.
- A model that follows AniList's schema. 35 classes mirror the API's types – Media, Title, CoverImage, Studio, Staff, Character, AiringSchedule, Recommendation and more – and a factory builds objects with typed properties from the response.
- No configuration. Public queries need no token, so a first search takes a few lines.
- A playground on the live API. The form in the documentation runs the same AnimeRepository::search() method the guide describes, on the server, against the real AniList.
What you don't see
- Guarded input. The playground is a public path to someone else's service, so it limits the query length and the number of results and leaves adult titles out of the search.
- A strict CSP. The browser never talks to AniList directly; the query goes through the server. That lets the page run under a Content Security Policy that allows connections only to its own domain and images only from AniList's CDN.
Technology
- PHP 8.1+ – enums for variable types and typed model properties.
- Guzzle – the HTTP client for API calls.
- GraphQL – AniList API v2.
- Composer – installation as a package.
Screenshots
4 screenshots
Built with
- PHP 8.1+
- GraphQL
- Guzzle
- AniList API
- Composer