First time here? Check out the FAQ!

Querying Media resource by MLSNum

  • retag add tags

We want to switch from downloading the photos for GALMLS to just using the Media URLs, but it seems like the Media resource is missing data. For example, MLS# 879663 has 30 photos, but when I query the Media data I get nothing back:

Why is that?


jflaig's avatar
asked 2020-07-02 10:41:55 -0500
edit flag offensive 0 remove flag close merge delete


add a comment see more comments

1 Answer


Looks like your account profile is only configured to allow Media for Active listings.
That particular listing is Pending so you wouldn't be able to see Media for it.
You will need to contact the MLS directly to request access.

bwolven's avatar
answered 2020-07-02 11:46:44 -0500
edit flag offensive 0 remove flag delete link


But that makes no sense, with our account we can download Pending, Contingent, and Coming soon listings. This sounds like a mistake. Can you fix it?

Separately, we see that very often the media urls are temporarily unavailable. They seem flaky. Likewise, our multipart GetObject photo downloads frequently encounter timeouts downloading photos. It's a persistent issue that's well documented in our logs. Are you aware of these problems?

jflaig's avatar jflaig (2020-07-02 11:52:43 -0500) edit

I looked and several other similar feeds have the same Media settings.
You will need to contact the MLS directly on this.
When using GETOBJECT I always recommend using Location=1 to return the URLs.
If you need the actual images, you can download them using the URL returned.
This is much more efficient than downloading multiple large image files using GETOBJECT.
When done this way, it takes into account image caching schemes.

bwolven's avatar bwolven (2020-07-02 12:14:38 -0500) edit

Ok, we will contact the MLS, as for the rest I am familier with that, but it doesn't address the consistent performance issues we have getting the photo files and with the Media URLs sometimes producing 404s.

jflaig's avatar jflaig (2020-07-02 12:16:40 -0500) edit

Here's an example, one of many many dozens, where we get errors trying to get photos. MLS# 854398 has a photocount of 28, but we can only get 26 photos. Attempting to get the 27th photos, for instance, returns this:

<rets replycode="20409" replytext="Object Unavailable [854398:27]." &gt;="" <="" rets="">

jflaig's avatar jflaig (2020-07-06 07:51:35 -0500) edit

I cleaned up the images. Hopefully this will be much better now.
There can always be issues where the image may not present though.
Users can leave gaps in the image order or be in the process of maintaining them when you pull.
You should allow for missing images in your code and handle it gracefully.

bwolven's avatar bwolven (2020-07-06 11:53:26 -0500) edit

So as a rule of thumb if the object is unavailable we should essentially ignore it and our process should not try to re download it ever?

jflaig's avatar jflaig (2020-07-06 11:55:31 -0500) edit

I wouldn't try to download it again unless Last_Photo_updt changes signifying images changed.
It could only be a temporary situation, such as when images are being reordered.
But that process should update the Last_Photo_updt when completed.

bwolven's avatar bwolven (2020-07-06 12:01:41 -0500) edit

so in this scenario the photo count in the listing data cannot always really be relied on to be accurate, correct? If our process compares the photo count to what we have and sees a difference it will try and get the missing pics, but you're saying sometimes there may be gaps, but the gaps aren't accounted for in the photo count. Isn't that a bug?

jflaig's avatar jflaig (2020-07-06 12:39:54 -0500) edit
add a comment see more comments

Your Answer

Login/Signup to Answer