Topic: [API] How to get a user's favourite count programatically?

Posted under General

I'm trying to figure out the best way of fetching the number of favourites a user has for a project I'm working on. Unfortunately https://e621.net/users/299528.json does not show fav count.

Will I just have to scrape the user page directly?

bitWolfy

Former Staff

cdxxblazeit said:
I'm trying to figure out the best way of fetching the number of favourites a user has for a project I'm working on. Unfortunately https://e621.net/users/299528.json does not show fav count.

Will I just have to scrape the user page directly?

Open https://e621.net/users/299528.json in the browser and look through it.
At the bottom of the output, you should see this: https://i.imgur.com/zgZX2It.png

The request simply needs to be authorized in order for you to see the number of favorites you have.
If you are making an external app that interfaces with e621's API (as opposed to a userscript or an extension), the only way to do so would be to log in with the API key.

Take a look at the help page, under "Logging In".

bitwolfy said:
Open https://e621.net/users/299528.json in the browser and look through it.
At the bottom of the output, you should see this: https://i.imgur.com/zgZX2It.png

The request simply needs to be authorized in order for you to see the number of favorites you have.
If you are making an external app that interfaces with e621's API (as opposed to a userscript or an extension), the only way to do so would be to log in with the API key.

Take a look at the help page, under "Logging In".

Ah I see it now.

Is there a way to see *other* user's favourite count when using an API key or can I only see my own?

bitWolfy

Former Staff

cdxxblazeit said:
Ah I see it now.

Is there a way to see *other* user's favourite count when using an API key or can I only see my own?

For some reason, that information is not available through the API.
My theory is that it has something to do with "privacy mode" - being able to hide your favorites from other users. Instead of hiding the favorites count for users with that mode on, the API just omits it altogether.

  • 1