Re: Marketo Rest API. Querying by fitler type returns error 1003 "Too many results match the filter" if matches found are more than 1000

Anonymous
Not applicable

Marketo Rest API. Querying by fitler type returns error 1003 "Too many results match the filter" if matches found are more than 1000

We are recently seen this issue when using the rest API. Currently we have 1002 records matching this criteria. Initially it was suggested that specifying the batchSize field would fix the issue. However this is not the case. So far I have not been able to find any documentation around this behavior non provided by Marketo. I was only able to find one other mention of this behavior in listed in the github readmen page for a Python implementation of the Marketo Rest API (https://github.com/segmentio/marketo-rest-python/blob/master/README.md).

A couple of questions:

1- Is this an expected behavior?

2- If so. Is there a work around for this issue?

Request:

GET https://[Removed].mktorest.com/rest/v1/leads.json?filterType=testID&fields=id&filterValues=1&batchSi... HTTP/1.1

Authorization: bearer [Removed]

Host: [Removed].mktorest.com

Response:

HTTP/1.1 200 OK

Server: nginx

Date: Tue, 11 Oct 2016 15:10:59 GMT

Content-Type: application/json;charset=UTF-8

Content-Length: 121

Connection: keep-alive

{"requestId":"48db#157b44bf4c0","success":false,"errors":[{"code":"1003","message":"Too many results match the filter"}]}

11 REPLIES 11
SanfordWhiteman
Level 10 - Community Moderator

Re: Marketo Rest API. Querying by fitler type returns error 1003 "Too many results match the filter" if matches found are more than 1000

This limit is documented. I guess I would ask why you're using a lookup key that's so far from unique, and what you're trying to do with the data. If you're trying to do a batch update (perhaps of this very field?) you can use a webhook instead.

If you describe your setup + requirements further we can give better advice.

Anonymous
Not applicable

Re: Marketo Rest API. Querying by fitler type returns error 1003 "Too many results match the filter" if matches found are more than 1000

Thanks for your answer. Before anything. Could you provided me to the link documenting this behavior?

Thank you.

SanfordWhiteman
Level 10 - Community Moderator

Re: Marketo Rest API. Querying by fitler type returns error 1003 "Too many results match the filter" if matches found are more than 1000

Y'know, I might just have known about this from experience and a Community post, not the official docs. Regardless, it isn't going away. 🙂

Jason_Reber__TH
Level 2

Re: Marketo Rest API. Querying by fitler type returns error 1003 "Too many results match the filter" if matches found are more than 1000

We just ran into this bug, too. Has the API documentation been updated to describe this? Can you please post the link?

I have a solution that uses the API, but our developers have run into some bugs back-to-back - this makes Marketo look extremely unstable.

Can you provide link to the documentation? I am close to recommending we abandon Marketo for this solution if this API doesn't stabilize.

SanfordWhiteman
Level 10 - Community Moderator

Re: Marketo Rest API. Querying by fitler type returns error 1003 "Too many results match the filter" if matches found are more than 1000

It's not unstable, far from it... documented at http://developers.marketo.com/rest-api/lead-database/leads/#query

Jason_Reber__TH
Level 2

Re: Marketo Rest API. Querying by fitler type returns error 1003 "Too many results match the filter" if matches found are more than 1000

Awesome, Sanford, thanks for the quick response.

Alejandro_Deguz
Level 2

Re: Marketo Rest API. Querying by fitler type returns error 1003 "Too many results match the filter" if matches found are more than 1000

Hi Sanford,

 

I am experiencing the same issue. I am trying to query Marketo based on Unique IDs from our CRM that is also stored in Marketo. I want to return results for certain values from Marketo i.e., firstName, lastName, address, etc and compare those from our CRM so that I am not sending unnecessary data that does not need to be updated in Marketo. Also create the new record in Marketo if it does not exist.

 

What solution would you suggest to avoid running into this issue?

SanfordWhiteman
Level 10 - Community Moderator

Re: Marketo Rest API. Querying by fitler type returns error 1003 "Too many results match the filter" if matches found are more than 1000

You're not going to be able to just issue arbitrary queries to the API regardless of cardinality.

 

You'd need to maintain an offline mirror of the entire Marketo db and query that.

Alejandro_Deguz
Level 2

Re: Marketo Rest API. Querying by fitler type returns error 1003 "Too many results match the filter" if matches found are more than 1000

Unfortunately, creating a back up of our Marketo DB does not seem like an option at this time, but more like a last resort.

 

I think "query" was a bad choice of words to use for what I am trying to do. I am trying to send a leads post to the Marketo API based on unique IDs as the filterType from our CRM. This unique ID helps me identify the lead in Marketo.

 

The problem is, sometimes the leads whose data have change in our CRM can be very large. Would the best solution be is to make sure that the filterValues do not exceed 1000 leads or is there a better alternative?