First time here? Check out the FAQ!

What criteria triggers "maxrows_reached: true"?

Hello and thank you for any help in advance!

I was curious if someone knew what objective criteria a RETS server uses to determine if a max number of rows for a search query result set has been reached. I'm assuming it is going to be based on the size of the the data returned, but I haven't found definitive information indicating one way or another.

For example, running a query of (L_ListingID=0+) matches 3400+ records, and in this situation maxrows_reached is true and returned_results_count is limited to 2500 records. However, when I run the same query but with an option of 'Select' => 'L_DisplayId', only asking for the MLS number, all 3400+ records are returned and maxrows_reached is false. This leads me to believe that the size of the data returned had not hit some limit.

If this is the case, is there some mechanism/standard that we can use when coding, knowing in some situations we'll have to build in batching/paging/an offset, but in other situations, we can have confidence that a search will not hit a definitive data limit that will trigger maxrows_reached: true?

Thanks again for any help! If my question needs more clarification, just let me know.

balefireagency's avatar
asked 2019-06-18 10:27:45 -0500
edit flag offensive 0 remove flag close merge delete


add a comment see more comments

1 Answer


The limits are set based on the user's account profile.
Limits can be set and be different for individual classes within each resource.
Fields flagged as inkeyindex in the metadata can be requested bypassing the limits.
That is why if you request only L_ListingID and L_DisplayId there isn't a limit applied.

When I pull from a client, I generally use Offset and Limit functionality to pull batches.
Checking the actual number of records returned in the first batch.
Then adjusting the limit for the next and subsequent batches accordingly.
For example: Offset=1, Limit=2500
Number of records returned: 2000
Next batch: Offset=2001, Limit=2000, etc

bwolven's avatar
answered 2019-06-18 11:31:21 -0500
edit flag offensive 0 remove flag delete link


This is really great info to know, @bwolven. I was unaware that InKeyIndex behaved that way. This is the solution I'm looking for. So would it be safe to say that any query that involves at least one field where InKeyIndex: 0 is going to be subject to maxrows_reached?

balefireagency's avatar balefireagency (2019-06-18 11:49:58 -0500) edit

Correct. If only InKeyIndex fields are specified in Select and Limit=NONE, the limit is suspended.
Use the InKeyIndex field pull once or twice a day to get key values to determine removals from feed.

bwolven's avatar bwolven (2019-06-18 11:51:58 -0500) edit

Also, when doing batching, make sure to check if any records are returned in the batch.
It is possible for the record count to change while you are pulling records.

bwolven's avatar bwolven (2019-06-18 11:56:52 -0500) edit

Great tips, @bwolven. Much appreciated and thank you!

balefireagency's avatar balefireagency (2019-06-18 12:04:30 -0500) edit
add a comment see more comments

Your Answer

Login/Signup to Answer