this post was submitted on 16 Nov 2021
7 points (100.0% liked)

Lemmy

12508 readers
11 users here now

Everything about Lemmy; bugs, gripes, praises, and advocacy.

For discussion about the lemmy.ml instance, go to !meta@lemmy.ml.

founded 4 years ago
MODERATORS
 

Is it possible to get Lemmy's search result in JSON format? E.g., to include the search in search engines like searx. That would be really awesome.

top 5 comments
sorted by: hot top controversial new old
[–] nutomic@lemmy.ml 3 points 3 years ago (1 children)
[–] kromonos@fapsi.be 2 points 3 years ago (1 children)

Perfect. Now I take a look at searx settings and how I can integrate it.

[–] nutomic@lemmy.ml 1 points 3 years ago

Sounds interesting!

[–] boi@lemmy.ml 2 points 3 years ago

Big searx supporter here, absolutely agree

[–] kromonos@fapsi.be 2 points 3 years ago* (last edited 3 years ago)

hmm 🤔 … Normally, the following in the settings.yml should do the trick:

  - name : lemmy
    engine : json_engine
    search_url : https://lemmy.ml/api/v3/search?q={query}&page={pageno}
    results_query : posts
    url_query : post/ap_id
    title_query : post/name
    content_query : post/body
    categories : social media
    shortcut : le
    paging : True
    disabled : False

But my searx instance doesn't even seem to fetch the JSON.