How to only show duplicates in RG

I am trying to create an RG that only shows duplicates and the duplicates associated data.

So, I have a list of terms (text), rank (number), URL (text) etc. And I want to show only the duplicate terms, their associated rank, URL etc. (data come directly from Google Search Console API).

I’ve been following this post How do you check if a data in a thing has a duplicate and show them? - #19 by SerPounce by @ SerPounce and @boston85719

The approach they outline does work (kinda):

What I get back from that is indeed a list of duplicate terms (which is great), but what I can’t wrap my head around is how I get hold of the associated data e.g. rank, URL etc.

Looking at the data in the inspector all I get back is:

What I need is something more like this:

Grouping - 1:
keyword: advert script
count: 2
rank: 10
rank: 20
url: www.mysite.com/pagea
url: www.mysite.com/pageb

Grouping - 2:
keyword: basic copywriting
count: 2
rank: 13
rank: 21
url: www.mysite.com/pagec
url: www.mysite.com/paged

Is there a way of doing what I’m after?

When you use group by operator you are no longer working with the type of data from your database, and instead you are now working with a type of data consider ‘grouping’…you would need to search for the data type from your DB that holds those other values and use the ‘grouping’ information in constraints on the search.

Hi - I think where I’m having problems is that the data is coming directly from an API, not the database, so ‘Search for’ is not an option.

Might try filtering the api data

Thanks. I cracked it in the end.

I outputted a list in ListShifter that used your method for showing duplicates. Then I used that list as a ‘is in’ filter/constraint on my main list.

2 Likes

This topic was automatically closed after 70 days. New replies are no longer allowed.