{"id":18495379,"url":"https://github.com/victrme/search-suggestions","last_synced_at":"2025-04-08T22:31:51.598Z","repository":{"id":174717129,"uuid":"652590610","full_name":"victrme/search-suggestions","owner":"victrme","description":"An API that parses search suggestions from a number of search providers (google, bing, duckduckgo...)","archived":false,"fork":false,"pushed_at":"2024-09-28T08:58:29.000Z","size":152,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T19:11:46.180Z","etag":null,"topics":["api","api-proxy","edge-function","netlify","suggestions"],"latest_commit_sha":null,"homepage":"https://suggestions.victr.me","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/victrme.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-12T11:40:20.000Z","updated_at":"2025-03-03T08:12:37.000Z","dependencies_parsed_at":"2023-10-14T20:23:37.653Z","dependency_job_id":"9bbd58ad-5844-41bd-9525-8511511b3b5a","html_url":"https://github.com/victrme/search-suggestions","commit_stats":{"total_commits":96,"total_committers":2,"mean_commits":48.0,"dds":"0.48958333333333337","last_synced_commit":"b54dfe5bc7d7c11b227176e113c3c835d2e5c67a"},"previous_names":["victrme/search-suggestions"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victrme%2Fsearch-suggestions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victrme%2Fsearch-suggestions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victrme%2Fsearch-suggestions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/victrme%2Fsearch-suggestions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/victrme","download_url":"https://codeload.github.com/victrme/search-suggestions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247940507,"owners_count":21021988,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","api-proxy","edge-function","netlify","suggestions"],"created_at":"2024-11-06T13:24:32.825Z","updated_at":"2025-04-08T22:31:46.586Z","avatar_url":"https://github.com/victrme.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Search Suggestions API\n\nAn API that parses search suggestions from a number of search providers. Might not live very long depending on the volatility of their APIs. Here's the list of available search providers:\n\n-   Google ( w/ presentations )\n-   Yahoo ( w/ presentations )\n-   Brave ( w/ presentations )\n-   Bing ( w/ presentations )\n-   Duckduckgo\n-   Qwant\n\nTry it here: https://suggestions.victr.me/\n\n## How to use\n\n#### Endpoint\n```HTTP\nGET /\n```\n\n| Parameter | Role            | Requirement |\n|-----------|-----------------|-------------|\n| `q`       | Search query    | required    |\n| `l`       | Localization    | optional    |\n| `with`    | Search provider | optional    |\n\n#### Response\n```ts\ntype Response = {\n  text: string\n  desc?: string // when presentation is available\n  image?: string // when presentation is available\n}[]\n```\n\n### Websockets\nUsing Clouflare workers, you can also get results using websockets.\n\n```js\nconst socket = new WebSocket('ws://localhost:8787')\n\nsocket.onmessage = function (event: MessageEvent) {\n  console.log(JSON.parse(event.data))\n}\n\nsocket.send(JSON.stringify({ q, with, lang }))\n```\n\n\n## Examples\n\n```HTTP\nGET /?q=can%20we%20go%20to\n```\n\n```json\n[\n  { \"text\": \"can we go to heaven with tattoos\" },\n  { \"text\": \"can we go to mars\" },\n  { \"text\": \"can we go to saturn\" },\n  { \"text\": \"can we go to your room now\" }\n]\n```\n\n\u003cbr /\u003e\n\n```HTTP\nGET /?with=google\u0026q=vercel\u0026l=fr\n```\n\n```json\n[\n  {\n    \"text\": \"vercel\"\n  },\n  {\n    \"text\": \"vercelli\",\n    \"desc\": \"Verceil — Ville en Italie\",\n    \"image\": \"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQID9TX_tSffwg1RLvecGtuPHMZWbbEOSx0d6_poXT6bqChYkEazWYz6G1ilQ\u0026s=10\"\n  },\n  {\n    \"text\": \"vercel villedieu le camp\",\n    \"desc\": \"Commune en France\",\n    \"image\": \"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQGB1DiSdJxQgJfHphVKCfENgDCeGWobdbBpErowNFfDEExoFTuRmmPfEVJuQ\u0026s=10\"\n  },\n  {\n    \"text\": \"vercel pricing\"\n  },\n  {\n    \"text\": \"vercel deploy\"\n  }\n]\n```\n\n## Install\n\nFirst clone this repository.\n\n### Netlify\n\n```bash\nnpm install netlify-cli -g\n\n# On port 8888\nnetlify dev\n```\n\n### Cloudflare Workers\n\n```bash\nnpm install wrangler -g\n\n# On port 8787\nwrangler dev\n\nwrangler deploy\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvictrme%2Fsearch-suggestions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvictrme%2Fsearch-suggestions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvictrme%2Fsearch-suggestions/lists"}