> For the complete documentation index, see [llms.txt](https://spinamp.gitbook.io/spinamp-hooks/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://spinamp.gitbook.io/spinamp-hooks/reference/hooks-reference/artists.md).

# Artists

#### **useAllArtistsQuery**(params?: [IApiListQueryParams](https://spinamp.gitbook.io/spinamp-sdk/reference/api-reference/types#iapilistqueryparams), queryOptions?: [UseQueryOptions](https://tanstack.com/query/v4/docs/reference/useQuery)): {artists: [IArtist](https://spinamp.gitbook.io/spinamp-sdk/reference/api-reference/types#iartist)\[], ...[UseQueryResult](https://tanstack.com/query/v4/docs/reference/useQuery)}

Used for querying list of all artists. If no `params` are provided, it will return list of **all** artists existing in the database, which will result in huge request. For pagination/infinite scroll queries, `usePaginatedArtistsQuery` is recommended.

#### **usePaginatedArtistsQuery**(pageSize? = 20, params?: Pick<[IApiListQueryParams](https://spinamp.gitbook.io/spinamp-sdk/reference/api-reference/types#iapilistqueryparams), 'filter' | 'orderBy'>, queryOptions?: [UseInfiniteQueryOptions](https://tanstack.com/query/v4/docs/reference/useInfiniteQuery)): {artists: [IArtist](https://spinamp.gitbook.io/spinamp-sdk/reference/api-reference/types#iartist)\[], totalCount: number | null, ...[UseInfiniteQueryResult](https://tanstack.com/query/v4/docs/reference/useInfiniteQuery)}

Used for querying list of all artists in chunks, e.g. for infinity list. Returns flat `artists` array with all fetched items, `totalCount` and all `UseInfiniteQueryResul` properties including `fetchNextPage` and `hasNextPage` properties for pagination.

#### **useArtistQuery**(idOrSlug: string, queryOptions?: [UseQueryOptions](https://tanstack.com/query/v4/docs/reference/useQuery)): {artist: [IArtist](https://spinamp.gitbook.io/spinamp-sdk/reference/api-reference/types#iartist) | null, tracks: [ITrack](https://spinamp.gitbook.io/spinamp-sdk/reference/api-reference/types#itrack)\[], ...[UseQueryResult](https://tanstack.com/query/v4/docs/reference/useQuery)}

Used for querying list of all artists. If no `params` are provided, it will return list of **all** artists existing in the database, which will result in huge request. For pagination/infinite scroll queries, `usePaginatedArtistsQuery` is recommended.
