Filtering Bulk Activity Extract API by List ID | Community
Skip to main content
Gulsah_Semiz
Level 1
September 30, 2019
Solved

Filtering Bulk Activity Extract API by List ID

  • September 30, 2019
  • 2 replies
  • 3688 views

Hi -- I have a question about the Bulk Activity Extract API. Is there a way to filter it by the list id? I tried the following codes, but it didn't work:

{
"format": "CSV",
"filter": {
"staticListId": 12345,
"createdAt": {
"startAt": "2019-08-01T00:00:00-00:00",
"endAt": "2019-08-31T23:59:59-00:00"
},
"activityTypeIds": [
1
]
}
}

{ 
"format": "CSV",
"filter": { 
"listId": 12345,
"createdAt": { 
"startAt": "2019-08-01T00:00:00-00:00",
"endAt": "2019-08-31T23:59:59-00:00"
},
"activityTypeIds": [ 
1
]
}
}

Thanks!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Mark_Price

Pretty sure that filter is only for the Lead Extract:

https://developers.marketo.com/rest-api/bulk-extract/bulk-lead-extract/#filters 

Bulk Activity will let you filter by activityId but that will give you all 'Added to List' activities. You could filter this further in your code but seems like this strategy would extract more data than what's needed. 

2 replies

Mark_PriceAccepted solution
Level 6
September 30, 2019

Pretty sure that filter is only for the Lead Extract:

https://developers.marketo.com/rest-api/bulk-extract/bulk-lead-extract/#filters 

Bulk Activity will let you filter by activityId but that will give you all 'Added to List' activities. You could filter this further in your code but seems like this strategy would extract more data than what's needed. 

Gulsah_Semiz
Level 1
September 30, 2019

Got it. Thanks, Mark!

I also tried exporting activities calling this endpoint (https://developers.marketo.com/rest-api/lead-database/activities/) but it became so time-consuming as I couldn't find a way to automate the process. 

SanfordWhiteman
Level 10
October 2, 2019

Weird that you'd say that IMO, because using the paginated Activities endpoint is easier to automate than the Bulk Extract, since it doesn't require any polling or job coordination.  You just charge straight through, following each new page (and of course being ready to refresh the token as necessary).