Why "tag_ids" shows empty in response of REST API call of all contacts?

When tries to retrieve a list of all contacts (via REST API) then I found all required contacts but each contact’s ‘tag_ids’ is empty although it has ‘tag_ids’. please notice “id=2041” in screenshot below.

But when i request for a single contact then it return with ‘tag_ids’ assigned to it. please notice “id=2041” in screenshot below.

Why this happening I have no idea. Please help me.

Thanks in advance.

You are correct in that it is not visible from that view. Extended relational information about objects (in this case the Contact’s relation to Tags) isn’t returned in list operations for performance reasons.

Thanks for replying.

Since the tags are not returned, What would be the best way to retreive contacts which are having specific tags?

It seems REST api’s doesn’t have api’s for those so should I be using XML-RPC’s?

We hope to have a way to address that concern through the REST API within the next couple of release cycles, but if it is an immediately pressing concern, you can access it via XML-RPC, yes.

1 Like

@TomScott has this been updated at all? Is there a parameter we can pass in to receive this info back? I need to find contacts by email address and I’d prefer to get this info in one request instead of doing 2 requests: 1 to find by email and get that ID, and another to fetch the details (including tag_ids).

We evaluated the impact of this request, and have determined that providing the related list of tags through the search endpoint isn’t a workable solution at the moment, given the current structure of the database and object models.