cancel
Showing results for 
Search instead for 
Did you mean: 

Find total number of contacts

SOLVED
Highlighted
Occasional Advisor

Find total number of contacts

Hi,

 

I have gone through this community's posts on finding the total number of contacts for a given account. 

Just wanted to check back if this functionality is available now within CTCT.

 

To give more context around this question...I would need to iterate through the contacts (which is max 50 contacts per one API call followed by the next_link). In order to iterate I would need to get the total count of contacts before I start iterating. I can't do a API call to determine to see if there is next_link everytime. There are limits on how many times I can do the API call.

 

Thanks!

4 REPLIES 4
Moderator

Re: Find total number of contacts

Hello,

Thank you for reaching out to the API Support team here at Constant Contact.

In our new v3 API this is possible when your GET request uses include_count as true. You can see details on this call using our new API here:
https://v3.developer.constantcontact.com/api_reference/index.html#!/Contacts/getContacts

Having said that, using our v2 API you would need to call through each page to count the total number of contacts, however while the default limit is 50, you can set the limit to be up to 500.

Our standard API Key limitations are 10,000 calls per day and 4 calls per second. Aside from very specific use cases, if you are building for use by only a single Constant Contact account you would likely be able to work within this limit. We'd also be willing to work with you to help identify any ways your application could simplify the number of calls being made given your specific use case.

If you are instead building this for use by multiple Constant Contact accounts, you may consider joining our Technology Partner Program which comes with higher call limits. For more information on our partner program, see:
https://www.constantcontact.com/partners/technology

Please have a look and let me know if you have any questions!

Regards,
David B.
Tier II API Support Engineer

Tags (3)
Occasional Advisor

Re: Find total number of contacts

Thanks for that David.

Have a question about the next_link object. Once we reach the end of the contacts for a given set of parameters, would the next_link value be null?

 

 

Moderator

Re: Find total number of contacts

Hello,

 

There won't be a next_link and the "pagination" object will return empty when there are no more pages.

 

Regards,

 

David B.
Tier II API Support Engineer

Occasional Advisor

Re: Find total number of contacts

Thank you so much for the jiffy response.