[GH-ISSUE #1590] Feature Request: JSON-based search API for SearxNG #2459

Open
opened 2026-03-01 17:59:12 +03:00 by kerem · 1 comment
Owner

Originally created by @jrruethe on GitHub (Nov 11, 2024).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1590

Originally assigned to: @pirate on GitHub.

What type of suggestion are you making?

Proposing a new feature

What is the problem that your feature request solves?

I love Archivebox, and have almost 20k snapshots. The Sonic search method works great! I would love to be able to hook Archivebox into SearxNG as a search provider. The easiest way would be if there was a way to do am Archivebox search using an API that returned the results in JSON format. From what I can tell, the search results are currently done server-side and HTML is returned.

What is your proposed solution?

Some sort of /api/search?query="blah" endpoint that returns search results in JSON format.

What hacks or alternative solutions have you tried to solve the problem?

Currently, I have python code that scrapes the Archivebox HTML results and extracts the titles / urls using CSS selectors.

What version of ArchiveBox are you currently using?

Docker image `archivebox/archivebox:0.7.2`

How badly do you want this new feature?

  • It's an urgent deal-breaker, I can't live without it
  • It's important to add it in the near-mid term future
  • It would be nice to have eventually
  • I'm willing to work on a PR to develop this myself
  • I have donated money to go towards fixing this issue

Mini Survey

  • I like ArchiveBox so far / would recommend it to a friend
  • I've had a lot of difficulty getting ArchiveBox set up
  • I would pay $10/mo for a hosted version of ArchiveBox if it had this feature
Originally created by @jrruethe on GitHub (Nov 11, 2024). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1590 Originally assigned to: @pirate on GitHub. ### What type of suggestion are you making? Proposing a new feature ### What is the problem that your feature request solves? I love Archivebox, and have almost 20k snapshots. The Sonic search method works great! I would love to be able to hook Archivebox into SearxNG as a search provider. The easiest way would be if there was a way to do am Archivebox search using an API that returned the results in JSON format. From what I can tell, the search results are currently done server-side and HTML is returned. ### What is your proposed solution? Some sort of /api/search?query="blah" endpoint that returns search results in JSON format. ### What hacks or alternative solutions have you tried to solve the problem? Currently, I have python code that scrapes the Archivebox HTML results and extracts the titles / urls using CSS selectors. ### What version of ArchiveBox are you currently using? ```shell Docker image `archivebox/archivebox:0.7.2` ``` ### How badly do you want this new feature? - [ ] It's an urgent deal-breaker, I can't live without it - [x] It's important to add it in the near-mid term future - [ ] It would be nice to have eventually - [ ] I'm willing to [work on a PR](https://github.com/ArchiveBox/ArchiveBox#archivebox-development) to develop this myself - [ ] I have [donated money](https://github.com/ArchiveBox/ArchiveBox/wiki/Donations) to go towards fixing this issue ### Mini Survey - [x] I like ArchiveBox so far / would recommend it to a friend - [ ] I've had a lot of difficulty getting ArchiveBox set up - [ ] I would pay $10/mo for a hosted version of ArchiveBox if it had this feature
Author
Owner

@pirate commented on GitHub (Nov 12, 2024):

The new REST API in >= v0.8.5 has an /api/v1/list endpoint which does exactly what you're looking for.

https://demo.archivebox.io/api/v1/docs#/ArchiveBox%20CLI%20Sub-Commands/api_v1_cli_cli_list

Just pass ?as_json=true&filter_type=search&... and it'll seach using the full-text index and return JSON.

<!-- gh-comment-id:2469361407 --> @pirate commented on GitHub (Nov 12, 2024): The new REST API in >= v0.8.5 has an `/api/v1/list` endpoint which does exactly what you're looking for. https://demo.archivebox.io/api/v1/docs#/ArchiveBox%20CLI%20Sub-Commands/api_v1_cli_cli_list Just pass `?as_json=true&filter_type=search&...` and it'll seach using the full-text index and return JSON.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#2459
No description provided.