mirror of
https://github.com/benbusby/whoogle-search.git
synced 2026-04-25 04:05:57 +03:00
[GH-ISSUE #607] [FEATURE] Add a parsable (JSON or XML) endpoint for results #388
Labels
No labels
Fixed (Pending PR Merge)
Stale
bug
enhancement
enhancement
good first issue
help wanted
keep-open
needs more info
pull-request
question
theme
unfortunate
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/whoogle-search#388
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @throwaway34241 on GitHub (Jan 9, 2022).
Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/607
Describe the feature you'd like to see added
Current the
/searchendpoint returns a HTML file to display the results. This works well for UI users, which might be the first use case of Whoogle. But it's hard for programmatic use cases, as it requires parsing HTML.I propose to add a new
/search.{json|xml}endpoint to return the same results in a structured format: JSON or XMLIdea 1: JSON
A
/search.json?q=%sendpoint which would search results as JSON.I don't think there's a standard JSON format to use, but we could take inspiration for https://zenserp.com/ or https://serpapi.com/.
Idea 2: OpenSearch XML format
This project already uses opensearch, so we could leverage the same standard's response XML: https://github.com/dewitt/opensearch/blob/master/opensearch-1-1-draft-6.md#opensearch-response-elements
Additional context
I have a personal preference for JSON, as it seems to be today's web standard for APIs.
Adding parsable results would allow integration with various projects, via API (e.g. Zapier, Integromat), RSS or simple scripts. Some use cases include:
@vacom13 commented on GitHub (Feb 4, 2022):
@benbusby I will take it up
@sutidor commented on GitHub (Apr 7, 2022):
@vacom13 is there any beta to test?
@vacom13 commented on GitHub (Apr 7, 2022):
@sutidor unfortunately there isn't yet 😢.
@benbusby commented on GitHub (Jul 13, 2022):
Closing in favor of #814, which includes an example JSON response that could be used as a model for Whoogle JSON results.
@throwaway34241 commented on GitHub (Dec 30, 2022):
#814 is a dead link for me, any new updated link?
@benbusby commented on GitHub (Dec 30, 2022):
Huh, not sure what happened. I'll reopen this one.
@Anduin2017 commented on GitHub (Mar 15, 2024):
Also expecting this feature :D
@zenoize commented on GitHub (Oct 10, 2024):
Also expecting this feature
@emengweb commented on GitHub (Oct 25, 2024):
need json feature
@Glossardi commented on GitHub (Jun 17, 2025):
I would love to use Whoogle but i need the JSON feature!
@VeryUsual commented on GitHub (Aug 23, 2025):
@benbusby #1237
@Don-Swanson commented on GitHub (Sep 14, 2025):
Thanks @ProgramminCat
I'll review and test in the coming week. I'm trying to help Ben Catch up on PRs and issues, and starting with the easier ones.
@Don-Swanson commented on GitHub (Sep 24, 2025):
This has been incorporated into the Beta release: https://github.com/benbusby/whoogle-search/releases/tag/v1.0.0-beta
Please provide feedback if this is now resolved in beta.
@JustAnotherRandomUsername commented on GitHub (Sep 28, 2025):
Hello Don-Swanson
some bugs in json format?
screenshot
https://whoogle.pre.local/search?q=weather+colorado&format=jsonlooks like json format have wrong numbers of results ...
HTML
app/routes.pylines 402-424@Don-Swanson commented on GitHub (Oct 1, 2025):
@JustAnotherRandomUsername
Thanks for catching that. I pushed a fix to the beta branch that you can test to verify. (I didn't publish a new release for this)
@JustAnotherRandomUsername commented on GitHub (Oct 1, 2025):
Thank you! @Don-Swanson