import { Royaltyport } from '@royaltyport/sdk';
const royaltyport = new Royaltyport({
apiKey: 'rp_your_token_here',
});
const { data: results } = await royaltyport.search('project-id', 'Sony');
console.log(`Found ${results.entities.length} entities`);
console.log(`Found ${results.artists.length} artists`);
console.log(`Found ${results.contracts.length} contracts`);
for (const match of results.entities) {
console.log(`${match.name} (rank: ${match.rank})`);
console.log(' Matched keywords:', match.matched_keywords.join(', '));
console.log(' Metadata match:', match.is_metadata_match);
}