// Click "▶ Run" to try this code live.
const { Client } = require('podcast-api');
// If apiKey is null, then we will connect to a mock server
// that returns fake data for testing purposes.
const client = Client({ apiKey: null });
client.search({
q: 'star wars',
sort_by_date: 0,
type: 'episode',
offset: 0,
len_min: 10,
len_max: 30,
genre_ids: '68,82',
published_before: 1580172454000,
published_after: 0,
only_in: 'title,description',
language: 'English',
safe_mode: 0,
unique_podcasts: 0,
interviews_only: 0,
sponsored_only: 0,
page_size: 10,
}).then((response) => {
// Get response json data here
console.log(JSON.stringify(response.data));
}).catch((error) => {
console.log(error)
});