Skip to content

API results can skip pages #5326

Open
Open
@obulat

Description

@obulat

Description

The Openverse API shows inconsistent pagination when searching for the term bamberg:

  • Page 1 indicates multiple pages of results (e.g., page_count = 12).
  • Page 2 returns no results.
  • Page 3 unexpectedly contains results, breaking the logical flow of paginated data.

Reproduction

  1. GET https://api.openverse.org/v1/images/?page=1&q=bamberg
    • Observe that results are returned and page_count suggests multiple pages (e.g., 12 pages).
  2. GET https://api.openverse.org/v1/images/?q=bamberg&page=2
    • Observe that no results are returned.
  3. GET https://api.openverse.org/v1/images/?q=bamberg&page=3
    • Observe that results are returned, despite page 2 being empty.

Expected vs. Actual Behavior

  • Expected: The API should either return results consistently across each page or accurately reflect the number of valid pages in page_count.
  • Actual: Page 2 is empty while Page 3 contains results, contradicting the pagination info from Page 1.

Additional Information

This is probably related to the dead link filtering of the results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions