Skip to content

suno list only ever returns the first page #1

Description

@davlgd

suno list --page N (with any N) returns the same 20 clips as suno list (page 0). The CLI never paginates beyond the first page, regardless of the value of --page.

There is also no way to fetch the full catalog in one go, and an out-of-range page silently prints an empty table with no hint to the user.

Reproduction

$ suno --json list           | jq -r '.data[].id' | sort > /tmp/p0.txt
$ suno --json list -p 1      | jq -r '.data[].id' | sort > /tmp/p1.txt
$ suno --json list -p 2      | jq -r '.data[].id' | sort > /tmp/p2.txt
$ comm -12 /tmp/p0.txt /tmp/p1.txt | wc -l
20
$ comm -12 /tmp/p1.txt /tmp/p2.txt | wc -l
20

All three pages return identical IDs.

Root cause

/api/feed/v3 paginates with an opaque cursor — the UUID of the last clip from the previous page — not with a page index. The current code in src/api/feed.rs builds the request like this:

let req = FeedV3Request {
    cursor: if page > 0 { Some(page.to_string()) } else { None },
    ...
};

So for --page 1 the body is {"cursor": "1", ...}. The server cannot resolve "1" to a clip and falls back to returning the first page. Verified against a live response — the body of /api/feed/v3 ends with:

"next_cursor": "7d869de4-9476-4a4d-a6f2-c0eec968a3e2", "has_more": true

next_cursor is already declared on FeedResponse but is marked #[allow(dead_code)] and never read, which masked the bug.

Secondary issues

  • No --all to drain the feed in one command.
  • API_INTELLIGENCE.md:94 documents the request as {"page": 0}, which is also incorrect — sending page as an integer is ignored just like cursor: "1" is.

Proposed fix

Walk the real cursor chain: feed next_cursor from each response back into the next request, advancing one page per round-trip. Add --all for full-catalog fetches. Print a friendly message in table mode when the requested page is past the last available one.

Environment

  • suno-cli 0.5.4
  • macOS (darwin 25.4)
  • Rust stable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions