Ask Your Question

Limiting results on Media Resource query

asked 2020-05-09 12:10:42 -0600

updated 2020-05-09 12:42:07 -0600

I'm using the Media resource to get latitude and longitude for listings. I pass L_ListingID's in the query


Based on those 2 ID's I get 46 results, all the photos for the property. Each result has the same LMD_MP_Longitude, LMD_MP_Latitude. I've tried limit=1 in the query but has no affect on results.

QUESTION: is there a way to limit the results so that I only get the 1st result for each L_ListingID

On a side note/Complaint... Why does my board not return the lat and lon of listings? That seems like important information, especially when the developers are making search tools. The problem I run into is that if the listing has L_PictureCount = 0, I cannot get the lat and lon from the Media resource. I then pass the address to google geocoder, with tiger as a backup. Some agents enter bad addresses in the L_AddressStreet field. They add the unit number or something that causes the geocoder to return a bad result. The agent should have to verify the location and the board should provide the lat and lon to developers so we can make the best tools for searching. ... end of rant

UPDATE: I tried querying on the L_Update date in the Media resource and I see a limit of 1000 total results which equates to about 55-58 listings

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2020-05-10 06:42:10 -0600

You should be using the Property resource to get the lat/long values.
If they aren’t enabled, you can contact the MLS and request that they be enabled for your account.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-05-09 12:10:42 -0600

Seen: 241 times

Last updated: May 10 '20