Skip to main content
POST
Search Music Tracks

Overview

Search through Pictory’s music library to find tracks that match your specific criteria. Filter by multiple attributes including genre groups, genres, moods, instruments, purposes, duration, and search queries. Results include streaming URLs, metadata, and comprehensive categorization data.
You need a valid API key to use this endpoint. Get your API key from the API Access page in your Pictory dashboard.

API Endpoint


Request Parameters

Headers

string
required
API key for authentication (starts with pictai_)

Body Parameters

integer
default:"1"
Page number for pagination (must be ≥ 1)
integer
default:"100"
Number of results per page (must be between 20 and 100)
string
default:"latest"
Sort order for resultsOptions:
  • latest - Sort by most recently added tracks
  • shuffle - Randomize the order of results
  • featured - Sort by featured/curated tracks
string
Search query to filter tracks by keywords in title or description
array of strings
Filter by genre groups (e.g., [“Rock”, “Electronic”]). Use the Get Music Genre Groups endpoint to retrieve valid values.
array of strings
Exclude specific genre groups from results
array of strings
Filter by specific genres (e.g., [“Indie Rock”, “Techno”]). Use the Get Music Genres endpoint to retrieve valid values.
array of strings
Exclude specific genres from results
array of strings
Filter by moods (e.g., [“Happy / Bright”, “Energetic / Lively”]). Use the Get Music Moods endpoint to retrieve valid values.
array of strings
Exclude specific moods from results
array of strings
Filter by instruments (e.g., [“Piano”, “Guitar - Acoustic”]). Use the Get Music Instruments endpoint to retrieve valid values.
array of strings
Exclude specific instruments from results
array of strings
Filter by purposes (e.g., [“Corporate / Business”, “Wedding”]). Use the Get Music Purposes endpoint to retrieve valid values.
array of strings
Exclude specific purposes from results
integer
Minimum track duration in seconds
integer
Maximum track duration in seconds

Response

array of objects
Array of music track objects matching the search criteria
integer
Total number of tracks matching the search criteria across all pages
integer
Total number of pages available for the search results
integer
Current page number in the result set

Response Examples


Code Examples

Replace YOUR_API_KEY with your actual API key that starts with pictai_

Usage Notes

Use the negation filters (notGenre, notMood, notInstrument, notPurpose) to exclude specific attributes and refine your search results. This is particularly useful for finding tracks that match a mood but exclude certain instruments or genres.
Pagination Requirements: The pageSize parameter must be between 20 and 100. If you need fewer results, simply use the first N items from the response array.
Filter Validation: All filter values (genres, moods, instruments, purposes) are case-sensitive and must match exactly as returned by their respective list endpoints. Use the dedicated GET endpoints to retrieve valid filter values before searching.

Common Use Cases

1. Search by Keyword

Find tracks matching a specific search term:

2. Filter by Multiple Criteria

Combine multiple filters for precise results:

3. Exclude Unwanted Attributes

Use negation filters to refine results:
Find tracks within a specific duration range:

5. Paginate Through Results

Retrieve all pages of search results:

6. Sort and Filter Combined

Use sorting with filters for optimal results:

7. Build a Smart Music Recommender

Create recommendations based on video content:

8. Genre Group Exploration

Search by high-level genre groups and drill down: