Open throwaway34241 opened 2 years ago
@benbusby I will take it up
@vacom13 is there any beta to test?
@sutidor unfortunately there isn't yet 😢.
Closing in favor of #814, which includes an example JSON response that could be used as a model for Whoogle JSON results.
Huh, not sure what happened. I'll reopen this one.
Also expecting this feature :D
Also expecting this feature
need json feature
Describe the feature you'd like to see added
Current the
/search
endpoint 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=%s
endpoint 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: