Query Types
Singular Queries
Singular queries fetch a single resource by a unique identifier likeid or slug.
Available Singular Queries:
anime- Fetch a single animeartist- Fetch a single artistseries- Fetch a single seriesstudio- Fetch a single studiovideo- Fetch a single videoplaylist- Fetch a single playlistplaylistTrack- Fetch a single playlist trackpage- Fetch a single documentation page
Pagination Queries
Pagination queries fetch multiple resources with filtering, sorting, and pagination support. Available Pagination Queries:animePagination- List anime resourcesartistPagination- List artist resourcesstudioPagination- List studio resourcesvideoPagination- List video resources- And many more…
Field Selection
One of GraphQL’s key features is the ability to request only the fields you need.Basic Field Selection
All Available Fields
Request all available fields for an anime:Nested Resource Queries
GraphQL allows you to query related resources in a single request, eliminating the need for multiple API calls.Querying Related Themes
Querying Multiple Relations
Pagination Query Example
Fetch a paginated list of anime:Using Variables
Variables make queries reusable and easier to maintain. Query:Aliases
Use aliases to rename fields in the response or query the same field multiple times with different arguments:Fragments
Fragments allow you to reuse common field selections:Search Query
The API provides a unified search query that searches across multiple resource types:Best Practices
Request Only What You Need
Request Only What You Need
Only include fields that you’ll actually use. This reduces response size and improves performance.
Use Variables for Dynamic Queries
Use Variables for Dynamic Queries
Instead of building query strings dynamically, use GraphQL variables to pass dynamic values.
Leverage Fragments for Reusability
Leverage Fragments for Reusability
Define fragments for commonly used field selections to keep your queries DRY.
Be Mindful of Query Depth
Be Mindful of Query Depth
The API has a maximum query depth of 13 levels. Avoid excessively nested queries.
Next Steps
Filtering
Learn how to filter query results
Sorting
Sort your query results