# Surge Geosite > Serves every v2fly/domain-list-community geosite list as a Surge rule set, a sing-box `.srs` rule set and a mihomo `.mrs` rule set. A new upstream release is live within minutes. This is the complete LLM-readable reference. The concise version is [`/llms.txt`](https://surge.bojin.co/llms.txt). ## Quick Answer Surge, Google through a proxy: ```ini [Rule] RULE-SET,https://surge.bojin.co/geosite/google,PROXY ``` Surge, Apple's mainland China domains direct: ```ini RULE-SET,https://surge.bojin.co/geosite/apple@cn,DIRECT ``` sing-box: `https://surge.bojin.co/geosite-srs/google` (binary rule set, format version 1). mihomo: `https://surge.bojin.co/geosite-mrs/google` (domain behavior, `format: mrs`). ## Endpoints ### `GET /geosite` Index of every list and the tags its entries carry: ```json { "apple": ["ads", "cn"], "google": ["!cn", "ads", "cn", "telemetry"] } ``` ### `GET /geosite/{name}` and `GET /geosite/{mode}/{name}` Surge rule set as `text/plain`, one rule per line (`DOMAIN-SUFFIX,`, `DOMAIN,`, `DOMAIN-KEYWORD,`, `DOMAIN-WILDCARD,`). Without a mode, `balanced` is used: `/geosite/google` equals `/geosite/balanced/google`. ### `GET /geosite/{mode}/{name}@{tag}` Only entries carrying the tag. A tag the list does not carry returns an empty rule set with `200`. ### `GET /geosite-srs/{name}` and `GET /geosite-srs/{name}@{tag}` sing-box binary rule set, version 1. `domain:` entries become suffix rules (plus an exact rule for dotted names), `full:` entries exact rules; keywords and regexes are kept. ### `GET /geosite-mrs/{name}` and `GET /geosite-mrs/{name}@{tag}` mihomo binary rule set with the `domain` behavior. `domain:x` becomes `+.x`, `full:x` becomes `x`. Keyword and regex entries cannot be expressed and are left out; `/geosite-meta/{name}` reports how many. ### `GET /geosite-meta` Manifest of the current version: the upstream release tag (`tag`), build time, totals, and for every list its tags, resolved entry count and Surge rule counts per mode. ### `GET /geosite-meta/{name}` One list in detail: upstream description when the list file has one, direct inclusions with their tag filters, the lists that include it, entry counts per type and per tag, the upstream files its entries come from, rule counts per mode and per tag, and `.srs` / `.mrs` counts. ## Modes - `balanced` (default): converts regexes conservatively and prefers leaving a rule out over a false match. - `strict`: keeps only regexes that convert losslessly. - `full`: converts as many regexes as possible and can over-match. ## Names And Tags - List names and tags are lowercase: `google`, `category-ads-all`, `geolocation-!cn`, `apple@cn`. - `@` may be encoded as `%40`. - Invalid names, tags or path encoding return `400`; unknown lists return `404`. ## Caching - Every response carries `x-geosite-version`, the upstream release tag it comes from. - `ETag` is a hash of the content, so a list that did not change between upstream releases keeps its ETag; send `If-None-Match` and expect `304`. - `Cache-Control: public, max-age=300`. ## Errors - `400`: invalid list name, tag, mode or path encoding. - `404`: unknown list, or a binary format for a tag the list does not carry. - `503` with `Retry-After`: no version has been built yet; retry shortly. ## Data Source And Refresh The source is [`v2fly/domain-list-community`](https://github.com/v2fly/domain-list-community). Every minute the service checks for a new release; when one appears it builds every list, tag and format from the release's source archive and switches to it. Lists resolve exactly like the upstream builder resolves them. ## Links - [List directory](https://surge.bojin.co/) - [GitHub repository](https://github.com/xxxbrian/Surge-Geosite) - [Upstream domain-list-community](https://github.com/v2fly/domain-list-community)