{"id":36969194,"url":"https://github.com/joeychilson/websurfer","last_synced_at":"2026-01-13T21:03:59.476Z","repository":{"id":327852791,"uuid":"1079811901","full_name":"joeychilson/websurfer","owner":"joeychilson","description":"An API designed to help LLMs surf the web.","archived":false,"fork":false,"pushed_at":"2025-12-21T04:19:49.000Z","size":325,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-21T04:42:01.188Z","etag":null,"topics":["llm","tool","web"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joeychilson.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-20T12:28:54.000Z","updated_at":"2025-12-21T04:18:18.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/joeychilson/websurfer","commit_stats":null,"previous_names":["joeychilson/websurfer"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/joeychilson/websurfer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeychilson%2Fwebsurfer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeychilson%2Fwebsurfer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeychilson%2Fwebsurfer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeychilson%2Fwebsurfer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joeychilson","download_url":"https://codeload.github.com/joeychilson/websurfer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeychilson%2Fwebsurfer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28399667,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["llm","tool","web"],"created_at":"2026-01-13T21:03:58.667Z","updated_at":"2026-01-13T21:03:59.464Z","avatar_url":"https://github.com/joeychilson.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WebSurfer\n\nWebSurfer is a high-performance API designed to help Large Language Models (LLMs) surf the web.\n\n## Getting Started\n\n1. **Clone the repository**\n\n   ```bash\n   git clone https://github.com/joeychilson/websurfer.git\n   cd websurfer\n   ```\n\n2. **Start Redis**\n   Ensure you have a Redis server running.\n\n   ```bash\n   redis-server\n   ```\n\n3. **Run the Server**\n   You can run the server directly using Go:\n\n   ```bash\n   export REDIS_URL=\"redis://localhost:6379/0\"\n   go run cmd/server/main.go\n   ```\n\n   Or build it first:\n\n   ```bash\n   go build -o websurfer cmd/server/main.go\n   ./websurfer\n   ```\n\n   By default, the server listens on port `8080`.\n\n## Configuration\n\nWebSurfer uses a `config.yaml` file for detailed behavior and environment variables for connection settings.\n\n### Environment Variables\n\n- `ADDR`: Server address (default `:8080`)\n- `REDIS_URL`: Redis connection URL (required, e.g., `redis://localhost:6379/0`)\n- `CONFIG_FILE`: Path to config file (default `./config.yaml`)\n- `LOG_LEVEL`: Logging level (`debug`, `info`, `warn`, `error`)\n\n### Config File\n\nSee `config.yaml` to tune:\n\n- Global cache TTLs\n- User Agents\n- Rate limits (requests per second, burst)\n- Site-specific patterns (e.g., distinct rules for `*.sec.gov` or `docs.*`)\n\n## Usage\n\n### Authentication\n\nAll API endpoints (except `/health`) require authentication via API key:\n\n```bash\n# Via Authorization header\n-H \"Authorization: Bearer YOUR_API_KEY\"\n\n# Or via X-API-Key header\n-H \"X-API-Key: YOUR_API_KEY\"\n```\n\n### Fetch a URL\n\nEndpoint: `POST /v1/fetch`\n\n```bash\ncurl -X POST http://localhost:8080/v1/fetch \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"url\": \"https://example.com\",\n    \"max_tokens\": 1000\n  }'\n```\n\n**Response:**\n\n```json\n{\n  \"metadata\": {\n    \"url\": \"https://example.com\",\n    \"status_code\": 200,\n    \"content_type\": \"text/html; charset=UTF-8\",\n    \"title\": \"Example Domain\",\n    \"estimated_tokens\": 150,\n    \"cache_state\": \"miss\"\n  },\n  \"content\": \"Example Domain\\n\\nThis domain is for use in illustrative examples...\",\n  \"pagination\": {\n    \"offset\": 0,\n    \"limit\": 1000,\n    \"total_tokens\": 150,\n    \"has_more\": false\n  }\n}\n```\n\n### Health Check\n\nEndpoint: `GET /health`\n\n```bash\ncurl http://localhost:8080/health\n```\n\n## License\n\nSee [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeychilson%2Fwebsurfer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoeychilson%2Fwebsurfer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeychilson%2Fwebsurfer/lists"}