# Hooks reference

Hooks give easy and quick way to access particular data types from spinamp database. Every hook is built on top of `useQuery` or `useInfiniteQuery` hooks from 'react-query' (<https://tanstack.com/query/v4/docs/reference/useQuery>).

Each hook returns all properties from the wrapped hooks, extended with some direct accessible data like `tracks`, `artist`, etc. Every hook also takes optional `UseQueryOptions` object as the last argument, which can be used to set some specific `react-query` options.

Below is a list of all hooks APIs, grouped by referencing data types.

We'd also recommend skimming over the [`@spinamp/spinamp-sdk`](https://spinamp.gitbook.io/spinamp-sdk) for a list and description of query parameters and interfaces for all returned data.

Additionally, exploring the [GraphQL playground](https://spindex-api.spinamp.xyz/graphiql) where the data comes from will give you a better feel for what's available too.

## Tracks

{% content-ref url="hooks-reference/tracks" %}
[tracks](https://spinamp.gitbook.io/spinamp-hooks/reference/hooks-reference/tracks)
{% endcontent-ref %}

## Artists

{% content-ref url="hooks-reference/artists" %}
[artists](https://spinamp.gitbook.io/spinamp-hooks/reference/hooks-reference/artists)
{% endcontent-ref %}

## Collection

{% content-ref url="hooks-reference/collection" %}
[collection](https://spinamp.gitbook.io/spinamp-hooks/reference/hooks-reference/collection)
{% endcontent-ref %}

## Platforms

{% content-ref url="hooks-reference/platforms" %}
[platforms](https://spinamp.gitbook.io/spinamp-hooks/reference/hooks-reference/platforms)
{% endcontent-ref %}

## Playlists

{% content-ref url="hooks-reference/playlists" %}
[playlists](https://spinamp.gitbook.io/spinamp-hooks/reference/hooks-reference/playlists)
{% endcontent-ref %}
