Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Number of active users does not match the value provided by the instance API #143

Open
seanthegeek opened this issue Jan 7, 2023 · 3 comments

Comments

@seanthegeek
Copy link

The active users number provided by instances.social goes not match the users.active_month value provided by the /api/v2/instance endpoint.

For example instances.social currently reports that infosec.exchange has 18266 active users, but https://infosec.exchange/api/v2/instance reports a users.active_month value of 31944.

How is the number provided by instances.social calculated?

@seanthegeek
Copy link
Author

seanthegeek commented Jan 9, 2023

After a lot of digging in the code, I discovered the the active_users field returned by the instances.social is actually logins per week obtained from a Mastodon API v1 call.

active_users: instance.activity_prevw ? instance.activity_prevw.logins || null : null,

url: `https://${instance.name}/api/v1/instance/activity`,

logins: parseInt(activity[1].logins),

https://infosec.exchange/api/v1/instance/activity

Please consider renaming the misleading field name and/or using the 1active_users` count provided by the Mastodon API v2.

@TheKinrar
Copy link
Owner

I'll add the new monthly active users field to the returned object, but I can't rename an existing API field. It might be misleading now but when it was added it was the only active users stat available on Mastodon.
When I start working on a v2 of the instances.social API, I'll rename the field.

@zacharee
Copy link

Would it be possible to add a new field in the v1 API to filter by Mastodon's users.active_month value? Something like min_monthly_users.

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

No branches or pull requests

3 participants