Auto-configure filters in the sketchfab download widget

Hi all, I’m working on integrating Sketchab into a product here at VirBELA and we are using the download widget. It’s extremely easy to use and we’re really digging the possibilities here.

I’m wondering if it’s possible to pre-set the search filter inside the widget so that the results initially show up models in the 0-10K poly range? Our product lives on the web so we want those smaller models to appear by default in the search, rather than tell the users to set that filter themselves.

Thanks for any help,
Gabe

Hi @edorble :wave: !

I’m not 100% sure if that would answer your need (and you might already have found a solution), but I guess that your app makes a search query by using an url at some point, which you would have to alter in the code.

We have parameters you can pass to limit the number of faces in the model returned by the API call, and the following url will for instance return models having between 10045 and 10050 faces:

https://api.sketchfab.com/v3/search?type=models&downloadable=true&min_face_count=10045&max_face_count=10050

You can find more information on the available parameters for the search here:
https://docs.sketchfab.com/data-api/v3/index.html#!/search/get_v3_search_type_models

Hope this helps :+1:
Loïc.

Hi Loic, this is interesting and helpful - but what if we are using the Sketchfab download widget that just embeds the sketchfab search within the iframe of the widget?

-Gabe

PS: a bit of a feature request here, but it’d be cool if there was a filter for “file size” in the widget, not just “poly count”.

Hi Gabe

I’m not sure of what you mean with “Download widget” :thinking:

With a quick glance on your website, it looks like you are using Unity? If so, is the “Download widget” the plugin available at this link: https://github.com/sketchfab/unity-plugin/releases/tag/1.1.1 ?

If yes, I think we won’t display the 0 to 10k models by default in it, as this would probably be too “restrictive” for most users who are not necessarily capped by this limit.

If you are not referring about Unity, then I’d need to have more context about what you mean with “Download widget” to try and help you. And any other info you think might be relevant of course :+1:

Have a great day,
Loïc

Hi @norgeotloic, thanks for the replies! On our website (built with webxr, framevr.io), we use what is referred to in your documentation as the “Sketchfab importer for web apps” (Download API Libraries - Developers - Sketchfab). It’s the experience within that importer that we are hoping to customize a bit.

-Gabe

Hi @norgeotloic, still curious about this. Being able to filter by “size” instead of poly count would also be helpful. Sort of curious if there are any plans to make the widget that is the “sketchfab importer for web apps” a bit more customizable.