[GH-ISSUE #425] search: handle profiles #317

Closed
opened 2026-02-27 23:00:09 +03:00 by kerem · 2 comments
Owner

Originally created by @ghost on GitHub (Aug 15, 2023).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/425

Is your feature request related to a problem? Please describe.
search() returns profiles as albums. They are not albums and attempting to get their contents with get_album() results in KeyError: 'musicDetailHeaderRenderer'.

Describe the solution you'd like
ytmusicapi could add a "profile" result type and a get_profile() method.

Describe alternatives you've considered
These results have the category set to "Profiles", so I can filter them out on my end for the time being.

Additional context
Profiles in search results

Profile view

{
    "category": "Profiles",
    "resultType": "album",
    "title": "Avicii Junior",
    "type": "Profile",
    "duration": None,
    "year": None,
    "artists": [{"name": "@AviciiJunior-be5yg", "id": None}],
    "browseId": "UCK1Llmx17vJynG9HeXd65lw",
    "isExplicit": False,
    "thumbnails": [
        {
            "url": "https://yt3.googleusercontent.com/ytc/AOPolaS5n7w5ZqnKjUCVQ7vOAuEAawnwfyw3ufZFJqlPa9phM7amD9YaPR4QAL1vZTUw=w60-c-h60-k-c0x00ffffff-no-l90-rj",
            "width": 60,
            "height": 60,
        },
        {
            "url": "https://yt3.googleusercontent.com/ytc/AOPolaS5n7w5ZqnKjUCVQ7vOAuEAawnwfyw3ufZFJqlPa9phM7amD9YaPR4QAL1vZTUw=w120-c-h120-k-c0x00ffffff-no-l90-rj",
            "width": 120,
            "height": 120,
        },
    ],
}
Originally created by @ghost on GitHub (Aug 15, 2023). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/425 **Is your feature request related to a problem? Please describe.** `search()` returns profiles as albums. They are not albums and attempting to get their contents with `get_album()` results in `KeyError: 'musicDetailHeaderRenderer'`. **Describe the solution you'd like** ytmusicapi could add a "profile" result type and a `get_profile()` method. **Describe alternatives you've considered** These results have the category set to "Profiles", so I can filter them out on my end for the time being. **Additional context** ![Profiles in search results](https://github.com/sigma67/ytmusicapi/assets/111002801/af958a2b-8191-47c2-979a-6233152fe5af) ![Profile view](https://github.com/sigma67/ytmusicapi/assets/111002801/51253c49-ac21-4bfc-ada8-da2e65fbc304) ```py { "category": "Profiles", "resultType": "album", "title": "Avicii Junior", "type": "Profile", "duration": None, "year": None, "artists": [{"name": "@AviciiJunior-be5yg", "id": None}], "browseId": "UCK1Llmx17vJynG9HeXd65lw", "isExplicit": False, "thumbnails": [ { "url": "https://yt3.googleusercontent.com/ytc/AOPolaS5n7w5ZqnKjUCVQ7vOAuEAawnwfyw3ufZFJqlPa9phM7amD9YaPR4QAL1vZTUw=w60-c-h60-k-c0x00ffffff-no-l90-rj", "width": 60, "height": 60, }, { "url": "https://yt3.googleusercontent.com/ytc/AOPolaS5n7w5ZqnKjUCVQ7vOAuEAawnwfyw3ufZFJqlPa9phM7amD9YaPR4QAL1vZTUw=w120-c-h120-k-c0x00ffffff-no-l90-rj", "width": 120, "height": 120, }, ], } ```
kerem 2026-02-27 23:00:09 +03:00
Author
Owner

@sigma67 commented on GitHub (Aug 15, 2023):

It seems they finally found a name for user profiles.

You should be able to get the profile using get_user.

<!-- gh-comment-id:1678849531 --> @sigma67 commented on GitHub (Aug 15, 2023): It seems they finally found a name for user profiles. You should be able to get the profile using [`get_user`](https://ytmusicapi.readthedocs.io/en/stable/reference.html?highlight=get_user#ytmusicapi.YTMusic.get_user).
Author
Owner

@sigma67 commented on GitHub (Aug 17, 2023):

Sorry, I didn't read properly. It's about extending search to handle profiles, which is a valid request.

<!-- gh-comment-id:1682251876 --> @sigma67 commented on GitHub (Aug 17, 2023): Sorry, I didn't read properly. It's about extending `search` to handle profiles, which is a valid request.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ytmusicapi#317
No description provided.