Skip to content

feat: pathfinder gql service #311

Open

Description

@pyrorhythm

hi! i've recently done some work reversing spotify app workflows, and i think 've done a pretty good job with api-partner.spotify.com/pathfinder.
you can see code at my proj (https://github.com/pyrorhythm/libspot/tree/main/pathfinder), we could possibly integrate core logic into golibrespot, with some enhancements like fetching actual gql query hashes from web player and such

Activity

  1. pyrorhythm commented on May 25, 2026

    @pyrorhythm
    ContributorAuthor

    also, i've reversed some restapi requests from spclient here too - https://github.com/pyrorhythm/libspot/tree/main/spc; could also use that as more stable option

  2. devgianlu commented on May 29, 2026

    @devgianlu
    Owner

    What is it used for?

  3. pyrorhythm commented on May 29, 2026

    @pyrorhythm
    ContributorAuthor

    it's a gateway to graphQL service, exposing bulk search endpoints (search suggestions, top search and such)

  4. pyrorhythm commented on May 29, 2026

    @pyrorhythm
    ContributorAuthor

    also it is used to return complete "Home" page structure

    const (
    	OpSearchTracks      BadgeOperation = "searchTracks"
    	OpSearchAlbums      BadgeOperation = "searchAlbums"
    	OpSearchArtists     BadgeOperation = "searchArtists"
    	OpSearchPlaylists   BadgeOperation = "searchPlaylists"
    	OpSearchPodcasts    BadgeOperation = "searchPodcasts"
    	OpSearchEpisodes    BadgeOperation = "searchFullEpisodes"
    	OpSearchUsers       BadgeOperation = "searchUsers"
    	OpSearchGenres      BadgeOperation = "searchGenres"
    	OpSearchTop         Operation      = "searchTopResultsList"
    	OpSearchSuggestions Operation      = "searchSuggestions"
    
    	OpHome                   Operation = "home"
    	OpGetAlbum               Operation = "getAlbum"
    	OpWhatsNewFeedNewItems   Operation = "whatsNewFeedNewItems"
    	OpRecentSearches         Operation = "recentSearches"
    	OpSaveRecentSearches     Operation = "saveRecentSearches"
    	OpIsFollowingUsers       Operation = "isFollowingUsers"
    	OpFeedBaselineLookup     Operation = "feedBaselineLookup"
    	OpFetchExtractedColors   Operation = "fetchExtractedColors"
    	OpGetDynamicColorsByUris Operation = "getDynamicColorsByUris"
    	OpQueryNpvArtist         Operation = "queryNpvArtist"
    )
  5. pyrorhythm commented on Jun 3, 2026

    @pyrorhythm
    ContributorAuthor

    so what do you think? if you want to, i can provide some examples and i would be happy to take this issue as a pull request :)

  6. devgianlu commented on Aug 2, 2026

    @devgianlu
    Owner

    Feel free to make a PR :)

  7. pyrorhythm commented on Aug 3, 2026

    @pyrorhythm
    ContributorAuthor

    I'd happily do so! But the question is - how to integrate these APIs into existing codebase? Subset of them are already in this codebase, but in gRPC format. Should we introduce them as a separate lowest level package, or subpackage existing ones? If you'd look at my existing codebase and what Ive already implemented, we can come up with a solution that suits your vision of librespot

  8. pyrorhythm commented on Aug 3, 2026

    @pyrorhythm
    ContributorAuthor

    Oh sorry I've thought that this is a more global PR. But we still can take more reversed solutions from my libspot :) Will start working on a PR for pathfinder this week

  9. devgianlu commented on Aug 3, 2026

    @devgianlu
    Owner

    My general stance is to reduce hand written code as much as possible: use Protobuf or OpenAPI where possible.

  10. pyrorhythm commented on Aug 3, 2026

    @pyrorhythm
    ContributorAuthor

    My general stance is to reduce hand written code as much as possible: use Protobuf or OpenAPI where possible.

    Unfortunately all of pathfinder was reversed by hand via MITM proxy bcs there is no Protobuf and/or OpenAPI handling the contract.
    I've tried to reverse .asar coming with application, but no concrete schemas were found

  11. devgianlu commented on Aug 3, 2026

    @devgianlu
    Owner

    My general stance is to reduce hand written code as much as possible: use Protobuf or OpenAPI where possible.

    Unfortunately all of pathfinder was reversed by hand via MITM proxy bcs there is no Protobuf and/or OpenAPI handling the contract.
    I've tried to reverse .asar coming with application, but no concrete schemas were found

    You can still write an OpenAPI spec and then codegen from it. That way the source of truth is a YAML file instead of the code, and people can reuse it to codegen in their own language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions