> For the complete documentation index, see [llms.txt](https://docs.cosmik.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cosmik.network/semble-api/search.md).

# Search

## Find similar URLs

> Returns URLs semantically similar to a given URL using vector similarity search.

```json
{"openapi":"3.0.2","info":{"title":"Semble API","version":"1.0.0"},"servers":[{"url":"https://api.semble.so/xrpc"}],"paths":{"/network.cosmik.search.getSimilarUrls":{"get":{"description":"Returns URLs semantically similar to a given URL using vector similarity search.","summary":"Find similar URLs","tags":["search"],"parameters":[{"name":"page","in":"query","schema":{"type":"number","nullable":true}},{"name":"limit","in":"query","schema":{"type":"number","nullable":true}},{"name":"sortBy","in":"query","schema":{"type":"string"}},{"name":"sortOrder","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"url","in":"query","required":true,"schema":{"type":"string"}},{"name":"threshold","in":"query","schema":{"type":"number","nullable":true}},{"name":"urlType","in":"query","schema":{"type":"string","enum":["article","link","book","research","audio","video","social","event","software"]}},{"$ref":"#/components/parameters/SembleClient"}],"operationId":"similarUrls","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"urls":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"metadata":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"author":{"type":"string"},"publishedDate":{"type":"string"},"siteName":{"type":"string"},"imageUrl":{"type":"string"},"type":{"type":"string"},"retrievedAt":{"type":"string"},"doi":{"type":"string"},"isbn":{"type":"string"}},"required":["url"]},"urlLibraryCount":{"type":"number"},"urlInLibrary":{"type":"boolean"},"urlConnectionCount":{"type":"number"},"urlIsConnected":{"type":"boolean"}},"required":["url","metadata","urlLibraryCount"]}},"pagination":{"type":"object","properties":{"currentPage":{"type":"number"},"totalPages":{"type":"number"},"totalCount":{"type":"number"},"hasMore":{"type":"boolean"},"limit":{"type":"number"}},"required":["currentPage","totalPages","totalCount","hasMore","limit"]}},"required":["urls","pagination"]}}}}}}}},"components":{"parameters":{"SembleClient":{"name":"X-Semble-Client","in":"header","required":false,"description":"A short identifier for your integration (e.g. `my-plugin`, `mcp`). Please set this if you are building an integration — it helps Semble understand which tools people use. Values are lowercased before being recorded, so `MyPlugin` and `myplugin` are the same client. After lowercasing the value must match `^[a-z0-9][a-z0-9_-]{0,31}$`; values that do not are ignored, and the client is inferred from the auth method instead.","schema":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,31}$"}}}}}
```

## Semantic search

> Returns URLs matching a natural-language query using vector search, optionally scoped to a user and filtered by type.

```json
{"openapi":"3.0.2","info":{"title":"Semble API","version":"1.0.0"},"servers":[{"url":"https://api.semble.so/xrpc"}],"paths":{"/network.cosmik.search.semantic":{"get":{"description":"Returns URLs matching a natural-language query using vector search, optionally scoped to a user and filtered by type.","summary":"Semantic search","tags":["search"],"parameters":[{"name":"page","in":"query","schema":{"type":"number","nullable":true}},{"name":"limit","in":"query","schema":{"type":"number","nullable":true}},{"name":"sortBy","in":"query","schema":{"type":"string"}},{"name":"sortOrder","in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"query","in":"query","required":true,"schema":{"type":"string"}},{"name":"threshold","in":"query","schema":{"type":"number","nullable":true}},{"name":"urlType","in":"query","schema":{"type":"string","enum":["article","link","book","research","audio","video","social","event","software"]}},{"name":"identifier","in":"query","schema":{"type":"string"}},{"$ref":"#/components/parameters/SembleClient"}],"operationId":"semantic","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"urls":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"metadata":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"author":{"type":"string"},"publishedDate":{"type":"string"},"siteName":{"type":"string"},"imageUrl":{"type":"string"},"type":{"type":"string"},"retrievedAt":{"type":"string"},"doi":{"type":"string"},"isbn":{"type":"string"}},"required":["url"]},"urlLibraryCount":{"type":"number"},"urlInLibrary":{"type":"boolean"},"urlConnectionCount":{"type":"number"},"urlIsConnected":{"type":"boolean"}},"required":["url","metadata","urlLibraryCount"]}},"pagination":{"type":"object","properties":{"currentPage":{"type":"number"},"totalPages":{"type":"number"},"totalCount":{"type":"number"},"hasMore":{"type":"boolean"},"limit":{"type":"number"}},"required":["currentPage","totalPages","totalCount","hasMore","limit"]}},"required":["urls","pagination"]}}}}}}}},"components":{"parameters":{"SembleClient":{"name":"X-Semble-Client","in":"header","required":false,"description":"A short identifier for your integration (e.g. `my-plugin`, `mcp`). Please set this if you are building an integration — it helps Semble understand which tools people use. Values are lowercased before being recorded, so `MyPlugin` and `myplugin` are the same client. After lowercasing the value must match `^[a-z0-9][a-z0-9_-]{0,31}$`; values that do not are ignored, and the client is inferred from the auth method instead.","schema":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,31}$"}}}}}
```

## Search AT Protocol accounts

> Searches for AT Protocol user accounts by handle or display name.

```json
{"openapi":"3.0.2","info":{"title":"Semble API","version":"1.0.0"},"servers":[{"url":"https://api.semble.so/xrpc"}],"paths":{"/network.cosmik.search.getAccounts":{"get":{"description":"Searches for AT Protocol user accounts by handle or display name.","summary":"Search AT Protocol accounts","tags":["search"],"parameters":[{"name":"term","in":"query","schema":{"type":"string"}},{"name":"q","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"number","nullable":true}},{"name":"cursor","in":"query","schema":{"type":"string"}},{"$ref":"#/components/parameters/SembleClient"}],"operationId":"atProtoAccounts","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"type":"string"},"actors":{"type":"array","items":{"type":"object","properties":{"did":{"type":"string"},"handle":{"type":"string"},"displayName":{"type":"string"},"description":{"type":"string"},"avatar":{"type":"string"},"associated":{"type":"object","properties":{"chat":{"type":"object","properties":{"allowIncoming":{"type":"string","enum":["all","none","following"]}},"required":["allowIncoming"]}}},"indexedAt":{"type":"string"},"createdAt":{"type":"string"},"viewer":{"type":"object","properties":{"muted":{"type":"boolean"},"blockedBy":{"type":"boolean"},"blocking":{"type":"string"},"following":{"type":"string"},"followedBy":{"type":"string"}}},"labels":{"type":"array","items":{"nullable":true}},"verification":{"nullable":true},"status":{"nullable":true}},"required":["did","handle"]}}},"required":["actors"]}}}}}}}},"components":{"parameters":{"SembleClient":{"name":"X-Semble-Client","in":"header","required":false,"description":"A short identifier for your integration (e.g. `my-plugin`, `mcp`). Please set this if you are building an integration — it helps Semble understand which tools people use. Values are lowercased before being recorded, so `MyPlugin` and `myplugin` are the same client. After lowercasing the value must match `^[a-z0-9][a-z0-9_-]{0,31}$`; values that do not are ignored, and the client is inferred from the auth method instead.","schema":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,31}$"}}}}}
```

## Recommended URLs

> Returns URLs recommended for a set of query strings. Each query's matches are ranked independently by network activity (saves, notes, collections, connections) with randomized ordering, then interleaved round-robin so no single query crowds out the others. Excludes URLs the calling user already saved. Ranking weights can be overridden per request; each distinct weight set is cached separately. Optionally filtered to a single \`urlType\`; changing it re-queries the vector database rather than reusing the cached ranked set. Paginated over a cached ranked set. When no queries are given, they are derived from random recent cards in the calling user's library (falling back to their profile bio), or, for unauthenticated callers, from random recent cards in the global feed; the derived queries are returned so later pages can pass them back.

```json
{"openapi":"3.0.2","info":{"title":"Semble API","version":"1.0.0"},"servers":[{"url":"https://api.semble.so/xrpc"}],"paths":{"/network.cosmik.search.getRecommended":{"get":{"description":"Returns URLs recommended for a set of query strings. Each query's matches are ranked independently by network activity (saves, notes, collections, connections) with randomized ordering, then interleaved round-robin so no single query crowds out the others. Excludes URLs the calling user already saved. Ranking weights can be overridden per request; each distinct weight set is cached separately. Optionally filtered to a single `urlType`; changing it re-queries the vector database rather than reusing the cached ranked set. Paginated over a cached ranked set. When no queries are given, they are derived from random recent cards in the calling user's library (falling back to their profile bio), or, for unauthenticated callers, from random recent cards in the global feed; the derived queries are returned so later pages can pass them back.","summary":"Recommended URLs","tags":["search"],"parameters":[{"name":"queries","in":"query","schema":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"name":"page","in":"query","schema":{"type":"number","nullable":true}},{"name":"limit","in":"query","schema":{"type":"number","nullable":true}},{"name":"urlCardWeight","in":"query","schema":{"type":"number","nullable":true}},{"name":"noteWeight","in":"query","schema":{"type":"number","nullable":true}},{"name":"collectionWeight","in":"query","schema":{"type":"number","nullable":true}},{"name":"connectionWeight","in":"query","schema":{"type":"number","nullable":true}},{"name":"randomness","in":"query","schema":{"type":"number","nullable":true}},{"name":"urlType","in":"query","schema":{"type":"string","enum":["article","link","book","research","audio","video","social","event","software"]}},{"$ref":"#/components/parameters/SembleClient"}],"operationId":"recommended","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"urls":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"metadata":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"author":{"type":"string"},"publishedDate":{"type":"string"},"siteName":{"type":"string"},"imageUrl":{"type":"string"},"type":{"type":"string"},"retrievedAt":{"type":"string"},"doi":{"type":"string"},"isbn":{"type":"string"}},"required":["url"]},"urlLibraryCount":{"type":"number"},"urlInLibrary":{"type":"boolean"},"urlConnectionCount":{"type":"number"},"urlIsConnected":{"type":"boolean"}},"required":["url","metadata","urlLibraryCount"]}},"queries":{"type":"array","items":{"type":"string"}},"pagination":{"type":"object","properties":{"currentPage":{"type":"number"},"totalPages":{"type":"number"},"totalCount":{"type":"number"},"hasMore":{"type":"boolean"},"limit":{"type":"number"}},"required":["currentPage","totalPages","totalCount","hasMore","limit"]}},"required":["urls","queries","pagination"]}}}}}}}},"components":{"parameters":{"SembleClient":{"name":"X-Semble-Client","in":"header","required":false,"description":"A short identifier for your integration (e.g. `my-plugin`, `mcp`). Please set this if you are building an integration — it helps Semble understand which tools people use. Values are lowercased before being recorded, so `MyPlugin` and `myplugin` are the same client. After lowercasing the value must match `^[a-z0-9][a-z0-9_-]{0,31}$`; values that do not are ignored, and the client is inferred from the auth method instead.","schema":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,31}$"}}}}}
```

## Recommended users

> Returns users recommended for a set of URLs — users who saved or connected those URLs, plus Semble users the caller follows on Bluesky — ranked by activity, followers, recency, and Bluesky follow status, excluding users the caller already follows.

```json
{"openapi":"3.0.2","info":{"title":"Semble API","version":"1.0.0"},"servers":[{"url":"https://api.semble.so/xrpc"}],"paths":{"/network.cosmik.search.getRecommendedUsers":{"get":{"description":"Returns users recommended for a set of URLs — users who saved or connected those URLs, plus Semble users the caller follows on Bluesky — ranked by activity, followers, recency, and Bluesky follow status, excluding users the caller already follows.","summary":"Recommended users","tags":["search"],"parameters":[{"name":"urls","in":"query","required":true,"schema":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"$ref":"#/components/parameters/SembleClient"}],"operationId":"recommendedUsers","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"users":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"handle":{"type":"string"},"avatarUrl":{"type":"string"},"bannerUrl":{"type":"string"},"description":{"type":"string"},"isFollowing":{"type":"boolean"},"isSubscribed":{"type":"boolean"},"subscriptionScopes":{"type":"array","items":{"type":"string","enum":["CARD","CONNECTION","COLLECTION_SAVED"]}},"followsYou":{"type":"boolean"},"followerCount":{"type":"number"},"followingCount":{"type":"number"},"followedCollectionsCount":{"type":"number"},"urlCardCount":{"type":"number"},"collectionCount":{"type":"number"},"connectionCount":{"type":"number"},"connectionsByType":{"type":"object","properties":{"total":{"type":"number"}},"required":["total"],"additionalProperties":{"type":"number"}},"labels":{"type":"array","items":{"type":"object","properties":{"$type":{"type":"string","enum":["com.atproto.label.defs#label"]},"ver":{"type":"number"},"src":{"type":"string"},"uri":{"type":"string"},"cid":{"type":"string"},"val":{"type":"string"},"neg":{"type":"boolean"},"cts":{"type":"string"},"exp":{"type":"string"},"sig":{"nullable":true}},"required":["src","uri","val","cts"]}},"followsOnBsky":{"type":"boolean"}},"required":["id","name","handle","followsOnBsky"]}},"bskyFollowedSembleUserCount":{"type":"number"}},"required":["users","bskyFollowedSembleUserCount"]}}}}}}}},"components":{"parameters":{"SembleClient":{"name":"X-Semble-Client","in":"header","required":false,"description":"A short identifier for your integration (e.g. `my-plugin`, `mcp`). Please set this if you are building an integration — it helps Semble understand which tools people use. Values are lowercased before being recorded, so `MyPlugin` and `myplugin` are the same client. After lowercasing the value must match `^[a-z0-9][a-z0-9_-]{0,31}$`; values that do not are ignored, and the client is inferred from the auth method instead.","schema":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,31}$"}}}}}
```

## Recommended collections

> Returns collections containing any of the given URLs, ranked by card count, follower count, update recency, and whether the caller follows the collection author on Bluesky. Unauthenticated callers may omit urls, in which case the seed URLs are drawn from random recent cards in the global feed and the Bluesky-follow signal is skipped.

```json
{"openapi":"3.0.2","info":{"title":"Semble API","version":"1.0.0"},"servers":[{"url":"https://api.semble.so/xrpc"}],"paths":{"/network.cosmik.search.getRecommendedCollections":{"get":{"description":"Returns collections containing any of the given URLs, ranked by card count, follower count, update recency, and whether the caller follows the collection author on Bluesky. Unauthenticated callers may omit urls, in which case the seed URLs are drawn from random recent cards in the global feed and the Bluesky-follow signal is skipped.","summary":"Recommended collections","tags":["search"],"parameters":[{"name":"urls","in":"query","schema":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}},{"$ref":"#/components/parameters/SembleClient"}],"operationId":"recommendedCollections","responses":{"200":{"description":"200","content":{"application/json":{"schema":{"type":"object","properties":{"collections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"uri":{"type":"string"},"name":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"handle":{"type":"string"},"avatarUrl":{"type":"string"},"bannerUrl":{"type":"string"},"description":{"type":"string"},"isFollowing":{"type":"boolean"},"isSubscribed":{"type":"boolean"},"subscriptionScopes":{"type":"array","items":{"type":"string","enum":["CARD","CONNECTION","COLLECTION_SAVED"]}},"followsYou":{"type":"boolean"},"followerCount":{"type":"number"},"followingCount":{"type":"number"},"followedCollectionsCount":{"type":"number"},"urlCardCount":{"type":"number"},"collectionCount":{"type":"number"},"connectionCount":{"type":"number"},"connectionsByType":{"type":"object","properties":{"total":{"type":"number"}},"required":["total"],"additionalProperties":{"type":"number"}},"labels":{"type":"array","items":{"type":"object","properties":{"$type":{"type":"string","enum":["com.atproto.label.defs#label"]},"ver":{"type":"number"},"src":{"type":"string"},"uri":{"type":"string"},"cid":{"type":"string"},"val":{"type":"string"},"neg":{"type":"boolean"},"cts":{"type":"string"},"exp":{"type":"string"},"sig":{"nullable":true}},"required":["src","uri","val","cts"]}}},"required":["id","name","handle"]},"description":{"type":"string"},"accessType":{"type":"string","enum":["OPEN","CLOSED"]},"cardCount":{"type":"number"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"isFollowing":{"type":"boolean"},"isSubscribed":{"type":"boolean"},"subscriptionScopes":{"type":"array","items":{"type":"string","enum":["CARD","CONNECTION","COLLECTION_SAVED"]}},"followerCount":{"type":"number"},"authorFollowedOnBsky":{"type":"boolean"}},"required":["id","name","author","cardCount","createdAt","updatedAt","authorFollowedOnBsky"]}}},"required":["collections"]}}}}}}}},"components":{"parameters":{"SembleClient":{"name":"X-Semble-Client","in":"header","required":false,"description":"A short identifier for your integration (e.g. `my-plugin`, `mcp`). Please set this if you are building an integration — it helps Semble understand which tools people use. Values are lowercased before being recorded, so `MyPlugin` and `myplugin` are the same client. After lowercasing the value must match `^[a-z0-9][a-z0-9_-]{0,31}$`; values that do not are ignored, and the client is inferred from the auth method instead.","schema":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{0,31}$"}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.cosmik.network/semble-api/search.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
