Thanks to visit codestin.com
Credit goes to github.com

Skip to content

/recent/episodes endpoint issue #140

@chikichunchik

Description

@chikichunchik

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions