'What parameters are available for buzzsprout podcast API?
I am looking for parameter list or what parameters are available for buzzsprout podcast API?
I looked in documentation on buzzsprout.com for JSON based API buzzsprout team provides. By adding api_token in url listed below (with masked id), I am able to get all my podcasts but problem is to selected last 5,10 etc or pass parameter for filtering data by tags. I tried guessing by passing ?limit=5 or ?tags=Custom but nothing works. These are matching params for buzzsprout implementation which are passed to players JS script which example is this code below(where 9999 is podcast ID)
<div id='buzzsprout-large-player-99999-limit-5'></div><script type='text/javascript' charset='utf-8' src='https://www.buzzsprout.com/99999.js?player=large&limit=5&container_id=buzzsprout-large-player-99999-limit-5'></script>
API documentation requires api_token and this is example call (where xxxxxxxx is appi_token and 9999 podcast ID):
https://www.buzzsprout.com/api/99999/episodes.json?api_token=xxxxxxxxxxxxxxxxxx
So this URL above would return data but all my podcasts data. How do I send request to get JSON data with filter, sort, limit, or tags as iframe/player implementation can deliver? Is this possible at all?
Solution 1:[1]
After talking to buzzsprout support they confirmed that API has NO sorting capabilities and only parameters to pass are these they provided in API documentation -api_token and episodes ID as part of url. So answer is it's not possible at the moment of writing this comment.
Please before voting leave comment to express your votes, so you don't mislead other users who are looking for the similar answer by giving negative votes.
Added (04-22-2022): Be aware that API returns all episodes in results, even these published with date in future (should not but it does), and episodes which are not live (they are just uploaded in buzzsprout but not live) they are all delivered in API response. This is in my personal opinion wrong not sorting and exposing to public data which are not live as well as delivering these data in response without explaining that in documentation which might make some of your customers in unpleasant situation. Make sure to filter "private" and "published_at" property for each episode to prevent of displaying some episodes which are not supposed to be delivered in your UI.
Solution 2:[2]
You have to use JavaScript to sort. So BuzzSprout's API just gives you everything. Which is fine. You have the data now, so all you need to do is sort it.
If you just want the 5 newest results you can run something like a for
loop in JavaScript to target array[0]
- array[4]
.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | S. Remy Sheppard |