# Social Fetch API - Cosmos endpoints # Base URL: https://api.socialfetch.dev # Auth: x-api-key header (sfk_...) # Full catalog: https://www.socialfetch.dev/llms-endpoints.txt | JSON: https://www.socialfetch.dev/llms.json # Docs hub: https://www.socialfetch.dev/docs/api | OpenAPI: https://www.socialfetch.dev/openapi.json 7 documented Cosmos operations. Do not invent paths - only the routes below (and their linked markdown pages) are supported. ## GET /v1/cosmos/profiles/{handle} Get Cosmos profile Credit cost: 1 credit. Failed requests are free. Found and not-found answers are both charged. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/cosmos/profiles/handle/get.mdx SDK: client.cosmos.getProfile({ handle: "joris.kahl" }) Parameters: - handle (required, string) - Cosmos username from the profile link, with or without a leading @, for example `joris.kahl`. Outcome field: `data.lookupStatus` in `found`, `not_found` curl "https://api.socialfetch.dev/v1/cosmos/profiles/joris.kahl" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/cosmos/profiles/{handle}/posts List Cosmos profile posts Credit cost: 1 credit. Failed requests are free. Found and not-found answers are both charged. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/cosmos/profiles/handle/posts/get.mdx SDK: client.cosmos.listProfilePosts({ handle: "joris.kahl" }) Parameters: - handle (required, string) - Cosmos username from the profile link, with or without a leading @, for example `joris.kahl`. - cursor (optional, string) - Pass `page.nextCursor` from the previous response to get the next page. It only works with the same handle, collection or query. Pagination: send query `cursor` from prior `data.page.nextCursor`; stop when `data.page.hasMore` is false. Outcome field: `data.lookupStatus` in `found`, `not_found` curl "https://api.socialfetch.dev/v1/cosmos/profiles/joris.kahl/posts" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/cosmos/profiles/{handle}/collections List Cosmos profile collections Credit cost: 1 credit. Failed requests are free. Found and not-found answers are both charged. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/cosmos/profiles/handle/collections/get.mdx SDK: client.cosmos.listProfileCollections({ handle: "joris.kahl" }) Parameters: - handle (required, string) - Cosmos username from the profile link, with or without a leading @, for example `joris.kahl`. - cursor (optional, string) - Pass `page.nextCursor` from the previous response to get the next page. It only works with the same handle, collection or query. Pagination: send query `cursor` from prior `data.page.nextCursor`; stop when `data.page.hasMore` is false. Outcome field: `data.lookupStatus` in `found`, `not_found` curl "https://api.socialfetch.dev/v1/cosmos/profiles/joris.kahl/collections" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/cosmos/posts Get Cosmos post Credit cost: 1 credit. Failed requests are free. Found and not-found answers are both charged. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/cosmos/posts/get.mdx SDK: client.cosmos.getPost({ url: "https://www.cosmos.so/e/547956585" }) Parameters: - url (required, string) - Link to the Cosmos post (https://www.cosmos.so/e/{id}) or its numeric id. Outcome field: `data.lookupStatus` in `found`, `not_found` curl "https://api.socialfetch.dev/v1/cosmos/posts?url=https://www.cosmos.so/e/547956585" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/cosmos/collections Get Cosmos collection Credit cost: 1 credit. Failed requests are free. Found and not-found answers are both charged. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/cosmos/collections/get.mdx SDK: client.cosmos.getCollection({ url: "https://www.cosmos.so/joris.kahl/teh-nerd-stuff" }) Parameters: - url (required, string) - Link to the Cosmos collection, as in https://www.cosmos.so/joris.kahl/teh-nerd-stuff. Outcome field: `data.lookupStatus` in `found`, `not_found` curl "https://api.socialfetch.dev/v1/cosmos/collections?url=https://www.cosmos.so/joris.kahl/teh-nerd-stuff" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/cosmos/collections/posts List Cosmos collection posts Credit cost: 1 credit. Failed requests are free. Found and not-found answers are both charged. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/cosmos/collections/posts/get.mdx SDK: client.cosmos.listCollectionPosts({ url: "https://www.cosmos.so/joris.kahl/teh-nerd-stuff" }) Parameters: - url (required, string) - Link to the Cosmos collection, as in https://www.cosmos.so/joris.kahl/teh-nerd-stuff. - cursor (optional, string) - Pass `page.nextCursor` from the previous response to get the next page. It only works with the same handle, collection or query. Pagination: send query `cursor` from prior `data.page.nextCursor`; stop when `data.page.hasMore` is false. Outcome field: `data.lookupStatus` in `found`, `not_found` curl "https://api.socialfetch.dev/v1/cosmos/collections/posts?url=https://www.cosmos.so/joris.kahl/teh-nerd-stuff" \ -H "x-api-key: YOUR_API_KEY" ## GET /v1/cosmos/search/posts Search Cosmos posts Credit cost: 1 credit. Failed requests are free. Found and not-found answers are both charged. Auth: API key or x402 payment (no key needed for payment) Docs: https://www.socialfetch.dev/docs/api/v1/cosmos/search/posts/get.mdx SDK: client.cosmos.searchPosts({ query: "architecture" }) Parameters: - query (required, string) - Words to search for, up to 100 characters. Cosmos searches by meaning, so related posts match too. - cursor (optional, string) - Pass `page.nextCursor` from the previous response to get the next page. It only works with the same handle, collection or query. Pagination: send query `cursor` from prior `data.page.nextCursor`; stop when `data.page.hasMore` is false. Outcome field: `data.lookupStatus` in `found`, `not_found` curl "https://api.socialfetch.dev/v1/cosmos/search/posts?query=architecture" \ -H "x-api-key: YOUR_API_KEY"