[SOLVED] GET profile Image and username of a opensea address

Hey there,
I want to get a address profile picture of opensea and username of opensea but the api doesnt offer any option for that. I wanted how its done ?

maybe only opensea has that information, did you try opensea api?

no no. https://opensea.io/CryptoBulliez . I mean of this user for example.

The api dont offer any of that sadly

help please …

did you try to make a request to opensea website directly to get that image?

I get a 403 error when trying to do so

try to make it like it would be made by a browser, with a user agent specific to a browser in the http header

also, try to look in network tab to see how opensea website gets that image, you can also inspect that element to see the url

        let data = await fetch(`https://opensea.io/CryptoBulliez`,{
            method: 'GET',
            headers: {
                "Connection": 'keep-alive',
                "Cache-Control": 'max-age=0',
                "sec-ch-ua": '" Not A;Brand";v="99", "Chromium";v="99", "Google Chrome";v="99"',
                "sec-ch-ua-mobile": '?0',
                "sec-ch-ua-platform": "macOS",
                "Upgrade-Insecure-Requests": "1",
                "User-Agent": 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.83 Safari/537.36',
                "Accept": 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
                "Sec-Fetch-Site": 'none',
                "Sec-Fetch-Mode": 'navigate',
                "Sec-Fetch-User": '?1',
                "Sec-Fetch-Dest": 'document',
                "Accept-Encoding": 'gzip, deflate, br',
                "Accept-Language": 'en-GB,en-US;q=0.9,en;q=0.8',
            }
        }).then(async resp => console.log(await resp.text()));

I still get a 403 error :frowning:

it looks like this is the link, in case that it helps you

https://i.seadn.io/gae/EVQUkk6ZznakeVTb-uabHVeeffCdJs5mtDB6qg2Pp1UAk3FI6E-aVQyOjKuHzD8SPP4s2gFXR7dlrO8sfTf-AeBsiPKXrxKd1xfxig?auto=format&w=640

yeah but i want to get it with code xd

it looks like they have some kind of protection, I also get 403 error code with curl and this message:

error code: 1020

Try makingl a GET request to this endpoint:

https://api.opensea.io/user/CryptoBulliez
{
    "username": "CryptoBulliez",
    "account": {
        "user": {
            "username": "CryptoBulliez"
        },
        "profile_img_url": "https://i.seadn.io/gae/EVQUkk6ZznakeVTb-uabHVeeffCdJs5mtDB6qg2Pp1UAk3FI6E-aVQyOjKuHzD8SPP4s2gFXR7dlrO8sfTf-AeBsiPKXrxKd1xfxig?w=500&auto=format",
        "address": "0xd54938767f1b643d3026fe575bd05ea8a6873ace",
        "config": "",
        "currencies": {}
    }
}
1 Like

that worked. How did you find out ? On opensea docs they didnt mention that endpoint.

Also is it possible to get the instagram and website of the user ?

I found that from another forum. They have a few hidden endpoints.

I don’t know, you may have to resort to scraping for that.

okay ty. Can you send me that link where you found it ?

How can we get the user information from the API? : opensea (reddit.com)

1 Like