LiQL query giving different count

Hi Guys,


I'm using REST-API to find the count of users with the help of LiQL query.

but sometimes it is giving me as 278382 and sometimes it is giving me as 283847.


it is s everytime swapping from 278382 to 283847 or vice-versa.


do you have any idea why this is happening?


Thanks in Advance.

8 Replies 8
Honored Contributor

@hpanmand -  Could you please provide me the API call which you are using?

Trusted Contributor

That query is too broad so it will always fail. From the documentation "This must be constrained by the online_status parameter in the WHERE clause." 

So this would work:

SELECT count(*) FROM users WHERE online_status = 'online'


So for what you need I would use API 1:

Can you please help me to understand how to use


can you please give me an example so that would be great help.

Trusted Contributor

If you want to use it to just get the actual figure, you just change the URL to contain your community info and paste it into your browser. It displays as an xml page with no styling.

For example:

http://[your community home page url].com/[your community name]/restapi/vc/users/count


However if you want to use it in a custom component, this post explains how to use the REST API in a custom component -

is there any way in V2 REST-API by which we can find the count of users?

Trusted Contributor

Not that I know of, sorry @hpanmand!

okay @SheenaK

Welcome to the Technology board!

Curious about our platform? Looking to connect on social technology? You've come to the right place!

Are you a Khoros customer? For direct assistance from our Support team, please visit the Support Forum.