The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

Search by Email Address

Highlighted
Advisor

Search by Email Address

Is there a limit on how many email addresses we can search for in one Get?

contacts?email=u89439%40example.com&email=...

3 REPLIES 3
Highlighted
Employee

Re: Search by Email Address

Hey,

 

It can return up to 50 responses in the XML.  However it wont return false if any of them return.  It is typically better to do them individually unless your looking to see if a group of contacts exist. 

 

I hope this helps.

 

Ryan Davis
Quality Engineer
Highlighted
Advisor

Re: Search by Email Address

Okay, then if I choose to I can get all 17K in one initial get and subsequent gets to receive them back in batches of 50. Correct me if I'm wrong, assuming 1/s per round trip that's about 6 minutes to retrieve all the contacts. I have XSL that will parse the return into a contacts table with whatever fields I want, most likely this will be the basic contact in entry along w/last updated, which I'll compare w/my last updated date, at which point I can decide if either my CRM system needs an update or CtCt does. I wanted to run this as a nightly job. I may have another goal which is to do this multi threaded so that I can process our business rules at the same time and by the time I'm finished getting, I'm most nearly ready to start Put'ing the records that have changes/updates and any new records that weren't Put earlier in the day.

Highlighted
Employee

Re: Search by Email Address

Hey,

 

What you would want to do is use the lastUpdatedBy and gather all the contacts from a particular date.   If you want to get all your contacts in your account you would need to do a do while loop to hit your /contacts collection and it will return them in groups of 50 with a next link that you would continue to parse.  It would take sometime to get the results back like that every time.  That is why you would run that the first time with the do while and after that use the lastUpdatedBy.  The search feature is not intended to be used like that. 

Ryan Davis
Quality Engineer
Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured