Ask HN: Can I filter submissions by domain TLD?

4 points by thiht ↗ HN
I’d like to filter the HN submissions where the provided URL ends in .fr, to find blogs or personal websites of Frenchies. Is that possible?

I tried the obvious /from?site=*.fr but it doesn’t seem to be available

4 comments

[ 4.9 ms ] story [ 15.8 ms ] thread
https://hn.algolia.com/api/v1/search?query=.fr/&restrictSear...

Or https://hn.algolia.com/api/v1/search_by_date?query=.fr/&rest...

See restrictSearchableAttributes=url in https://hn.algolia.com/api

Then maybe some JavaScript:

   javascript:console.table(JSON.parse(document.body.innerText).hits.map(h => ({title: h.title, url: h.url, dt: h.created_at})))
The results aren't perfect. You could do more filtering on the client side.