Class SearchRequest
Search for Item request
Response
Search response
-
Constructor Summary
ConstructorsConstructorDescriptionSearchRequest(ApiClient apiClient, String q, List<String> type) Search for Item request -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the request into an executable api callincludeExternal(String includeExternal) limit(int limit) offset(int offset)
-
Constructor Details
-
SearchRequest
Search for Item request- Parameters:
apiClient-The API client
q-Your search query.
You can narrow down your search using field filters. The available filters are
album,artist,track,year,upc,tag:hipster,tag:new,isrc, andgenre. Each field filter only applies to certain result types.The
artistandyearfilters can be used while searching albums, artists and tracks. You can filter on a singleyearor a range (e.g. 1955-1960).
Thealbumfilter can be used while searching albums and tracks.
Thegenrefilter can be used while searching artists and tracks.
Theisrcandtrackfilters can be used while searching tracks.
Theupc,tag:newandtag:hipsterfilters can only be used while searching albums. Thetag:newfilter will return albums released in the past two weeks andtag:hipstercan be used to return only albums with the lowest 10% popularity.type-A comma-separated list of item types to search across. Search results include hits from all the specified item types. For example:
q=abacab&type=album,trackreturns both albums and tracks matching "abacab".
-
-
Method Details
-
market
- Parameters:
market-An ISO 3166-1 alpha-2 country code. If a country code is specified, only content that is available in that market will be returned.
If a valid user access token is specified in the request header, the country associated with the user account will take priority over this parameter.
Note: If neither market or user country are provided, the content is considered unavailable for the client.
Users can view the country that is associated with their account in the account settings.- Returns:
- this request
-
limit
- Parameters:
limit-The maximum number of results to return in each item type.
- Returns:
- this request
-
offset
- Parameters:
offset-The index of the first result to return. Use with limit to get the next page of search results.
- Returns:
- this request
-
includeExternal
- Parameters:
includeExternal-If
include_external=audiois specified it signals that the client can play externally hosted audio content, and marks the content as playable in the response. By default externally hosted audio content is marked as unplayable in the response.- Returns:
- this request
-
build
Build the request into an executable api call- Returns:
- an executable api call
-