Skip to main content
Answer

How can I retrieve the URL from the "Link Activity" tab of a campaign via API?

  • June 18, 2025
  • 2 replies
  • 59 views

Forum|alt.badge.img

Hello,

I'm currently collecting data via the API.
I'm trying to retrieve the URLs listed under the "Link Activity" tab of a campaign, but I haven't been able to find any relevant information in the documentation despite my best efforts.

Could anyone let me know if there's a way to access this data through the API?

Thank you in advance!

Best answer by ross_hopkins

Hi ​@echotech ,

I hope that either I or someone else in the community can help you out here.

I know that you can see the URL clicked if you retrieve ALL “Clicked URL” metric details:

https://a.klaviyo.com/api/events/?filter=equals(metric_id,"<CLICKED_URL_METRICID>")

However, you cannot filter by Campaign ID or Name as far as I can tell.

I also looked into the Query Campaign Values Endpoint (https://developers.klaviyo.com/en/reference/query_campaign_values) but whilst you can filter this by a Metric ID, I believe this will only return stats, and not the Clicked URL data.

Perhaps another community member can take what I’ve found and build on it to answer your question  

Thanks,
Ross

 

2 replies

ross_hopkins
Expert Problem Solver II
Forum|alt.badge.img+14
  • 2025 Champion
  • Answer
  • June 18, 2025

Hi ​@echotech ,

I hope that either I or someone else in the community can help you out here.

I know that you can see the URL clicked if you retrieve ALL “Clicked URL” metric details:

https://a.klaviyo.com/api/events/?filter=equals(metric_id,"<CLICKED_URL_METRICID>")

However, you cannot filter by Campaign ID or Name as far as I can tell.

I also looked into the Query Campaign Values Endpoint (https://developers.klaviyo.com/en/reference/query_campaign_values) but whilst you can filter this by a Metric ID, I believe this will only return stats, and not the Clicked URL data.

Perhaps another community member can take what I’ve found and build on it to answer your question  

Thanks,
Ross

 


  • Contributor I
  • June 24, 2025

Howdy!

Coincidentally I was having a similar problem. I ultimately ended up implementing my own way of being able to get the link activity report. Basically, there’s no direct way except without using a web scraper to access the Link Activity data for a given campaign. I built a workaround where I am able to query for ALL links across all campaigns for a given day, and then just filtered based on the campaign name.

If you wanna go 3rd party, I hosted that function on Apify so all you will need to do is get the date range and the name of the campaign for filtering the final results: https://apify.com/automation-architech/klaviyo-link-activity-api