Skip to content

/recent/episodes endpoint issue #140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
chikichunchik opened this issue Apr 9, 2025 · 0 comments
Open

/recent/episodes endpoint issue #140

chikichunchik opened this issue Apr 9, 2025 · 0 comments

Comments

@chikichunchik
Copy link

I want to get all recent episodes for the last week. I used this Python script that makes a request of the most recent 1000 episodes, takes the last one and passes it to a before param.

res_df = pd.DataFrame()
tmp_df = pd.DataFrame(get_episodes_batch(f'https://api.podcastindex.org/api/1.0/recent/episodes?max=1000')['items'])
res_df = pd.concat([res_df, tmp_df])
while True:
    last_id = tmp_df['id'].values[-1]
    print(last_id)
    print(tmp_df['datePublishedPretty'].values[0])
    print(tmp_df['datePublishedPretty'].values[-1])
    tmp_df = pd.DataFrame(get_episodes_batch(f'https://api.podcastindex.org/api/1.0/recent/episodes?max=1000&before={last_id}')['items'])
    res_df = pd.concat([res_df, tmp_df])

I expect tmp_df['datePublishedPretty'].values[0] and tmp_df['datePublishedPretty'].values[-1] to go back in time, but i got these results.

Image

For some reason time windows overlap each other. The results become even stranger when the script goes through several iterations

Image

it returns only 1000 episodes for March 09, 2023 3:00pm - April 07, 2025 10:31am time window. In the result I have about 35k episodes from random periods of time.

Maybe i'm using endpoint incorrectly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant