Cast Rewinder has a small API.
For all of you developers out there, there's a small RESTful API you can access via GET and POST methods.
GET
The API endpoint is rewind.website/api/get, here’s all the arguments you can pass:
urlrequired, the URL for a feed, or the URL for an iTunes or SoundCloud podcast pagefrequencyaccepts values:monthlyweeklydefault valuedailycustom_days
start_dateaccepts dates values, defaults to today, format `YYYY-MM-DD`start_date_timezoneaccepts timezone values, in the form of a TZ name, as defined in the official list of tz database time zones. E.g.America/Los_AngelesorEurope/Isle_of_Man(spaces in the name are replaced by “_”) defaults to “Etc/UTC”, or +00:00option_start_ataccepts positive integers, defaults to 1option_orderaccepts values:ascdefault valuedesc
option_formataccepts values:feed_rssdefault valuefeed_atomfeed_json
option_keepdatesaccepts values:falsedefault valuetrue
If frequency has the value custom_days, you have to provide an argument for each selected day, a failure to do so results in a stern warning and defaults the frequency to weekly.
custom_day_mon=yfor publication on mondayscustom_day_tue=yfor publication on tuesdayscustom_day_wed=yfor publication on wednesdayscustom_day_thu=yfor publication on thursdayscustom_day_fri=yfor publication on fridayscustom_day_sat=yfor publication on saturdayscustom_day_sun=yfor publication on sundays
Here’s a couple of examples:
- Basic request: rewind.website/api/get?url=https://itunes.apple.com/us/podcast/99-invisible/id394775318
- Complex request: rewind.website/api/get?url=https://itunes.apple.com/us/podcast/99-invisible/id394775318&frequency=custom_days&custom_day_mon=y&custom_day_tue=y&custom_day_sun=y&start_date=2018-07-01&start_date_timezone=Europe/Paris&option_start_at=1&option_order=desc&option_format=feed_atom&option_keepdates=true
POST
The API endpoint is rewind.website/api/post. You have to transmit the request in JSON format, as application/json. The arguments are pretty much the same as in the GET method.
Here is a sample JSON for a POST request, all these values are defaults:
{
"url": <your url>,
"frequency": "custom_days",
"custom_day_mon": false,
"custom_day_tue": false,
"custom_day_wed": false,
"custom_day_thu": false,
"custom_day_fri": false,
"custom_day_sat": false,
"custom_day_sun": false,
"start_date" : <today>,
"start_date_timezone" : "Etc/UTC",
"option_start_at": 1,
"option_order": "asc",
"option_format": "feed_rss",
"option_keepdates": false
}
Response
The API response to a well-formed request will be a JSON object containing the feed ID and the URL.
{
"feed_id": 16,
"url": "https://rewind.website/16/mon-tue-sun/20180708+0000"
}
With the feed ID you can build your own feed URLs, if you follow the right frequency, start date and options arguments.