How to get the number of activities per stage?

Hi there,

I’m trying to get the number of activities per stage, but it seems there is no way to get the stage_id in the activity endpoint.
So I just wanted to confirm whether it’s really impossible or if someone has figured out a workaround?

Thanks a lot

Hey @samy
Welcome to the community :raised_hands: As you would have noticed from the documentation, About the Pipedrive API

Deals are part of pipelines and (thereby stages). Activities do not directly belong to any stage and the association is through the deal data. If you are looking for this association, you can use the following endpoints to retrieve the required data.

Let me know if this helps

Hey Hem,

Thanks a lot for getting back to me.

The point of the analysis I’m working on is to assess how much effort is required to move a deal from one stage to another. And the proxy I’d like to use is the number of activities.

Now that you confirm that the API doesn’t allow for an easy way to get the number of activities broke down by stages, do you maybe have any workaround in mind that could help?

One workaround I thought of is to use to use the activity & stage date fields, but it would require a lot of modelling so I’d rather go this route in last resort.

Thanks again!

Hey @samy
Unfortunately, there is no workaround for this. The data has to be joined (via tools or via code) so that you can see the association :slight_smile:

You are right. This could be complicated. I shared some thoughts related to that here