metadata-filter as a service.
An online instance is available at https://metadata-filter.vercel.app/.
The format of request URL is /api/:filter?query, where
filteris a name of any available filtersqueryis a filter query string containing fields to filter and their values
For example, query for filtering track field is track=TrackName. You can put multiple fields as well - join them with ampersand.
The response is a JSON in the following format:
interface SuccessResponse {
status: 'success';
data: {
[field: string]: string;
};
}
interface ErrorResponse {
status: 'error';
message: string;
}The service uses predefined filters from metadata-filter:
- Amazon (
/api/amazon) - Remastered (
/api/remastered) - Spotify (
/api/spotify) - Tidal (
/api/tidal) - YouTube (
/api/youtube)
Each filter can process different fields. See src/filters.ts of metadata-filter for details.
For example, we want to filter "If I Get High (Official Video)" track name with YouTube filter.
Requesting /api/youtube?track=If%20I%20Get%20High%20(Official%20Video) will return a response with filter result in JSON format.
{
"status": "success",
"data": {
"track": "If I Get High"
}
}# Install dependencies
> npm install
# Run dev server
> npx vercel dev
# Run linter
> npm run lint
# Run tests
> npm test
# Format files
> npm run formatLicensed under the MIT License.