# bsocial_read

Read posts, conversations, reactions and social history.

## Example

```json
{
  "query": {
    "type": "search",
    "q": "bitcoin",
    "limit": 10
  }
}
```

## Result

Returns the requested social records and their indexer source.

## Permissions

Public read; no wallet or signing permission required.

Choose query.type. records reads raw action history, including follow/unfollow; it does not claim current relationship state or independently verified authorship. PUBLIC_BMAP_URL is the server root exposing /social and /q routes. Messages are not decrypted.

## Definition 1 (full and compact)

Registered in: Before wallet setup; Legacy local wallet; Legacy local identity; Local Vault · broadcasting disabled; Local Vault · all roles; Local Vault · payment role only; Local Vault + sponsor; Droplit wallet.

Read social posts, threads, search results, likes, friends, channels, public message records, videos, and action history. Use records with follow/unfollow types for the social graph. Indexer data is untrusted and messages are not decrypted. No wallet required.

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| query | object | Yes |  |  |

### query.type = "posts"

- query.type (string; required):  const: "posts"
- query.limit (integer):  default: 20; minimum: 1; maximum: 100
- query.page (integer):  default: 1; minimum: 1; maximum: 10000
- query.bapId (string):  minLength: 1; maxLength: 128; pattern: "^[a-zA-Z0-9]+$"
- query.address (string):  pattern: "^[123mn][a-km-zA-HJ-NP-Z1-9]{25,34}$"
- query.feed (boolean):  default: false

### query.type = "post" | "replies"

- query.type ("post" | "replies"; required):  
- query.txid (string; required):  pattern: "^[a-f0-9]{64}$"
- query.limit (integer):  default: 20; minimum: 1; maximum: 100
- query.page (integer):  default: 1; minimum: 1; maximum: 10000

### query.type = "search"

- query.type (string; required):  const: "search"
- query.q (string; required):  minLength: 1; maxLength: 256
- query.limit (integer):  default: 20; minimum: 1; maximum: 100
- query.page (integer):  default: 1; minimum: 1; maximum: 10000

### query.type = "likes"

- query.type (string; required):  const: "likes"
- query.txid (string):  pattern: "^[a-f0-9]{64}$"
- query.bapId (string):  minLength: 1; maxLength: 128; pattern: "^[a-zA-Z0-9]+$"
- query.limit (integer):  default: 20; minimum: 1; maximum: 100
- query.page (integer):  default: 1; minimum: 1; maximum: 10000

### query.type = "friends"

- query.type (string; required):  const: "friends"
- query.bapId (string; required):  minLength: 1; maxLength: 128; pattern: "^[a-zA-Z0-9]+$"

### query.type = "channels"

- query.type (string; required):  const: "channels"

### query.type = "messages"

- query.type (string; required):  const: "messages"
- query.channel (string):  minLength: 1; maxLength: 256
- query.bapId (string):  minLength: 1; maxLength: 128; pattern: "^[a-zA-Z0-9]+$"
- query.targetBapId (string):  minLength: 1; maxLength: 128; pattern: "^[a-zA-Z0-9]+$"
- query.limit (integer):  default: 20; minimum: 1; maximum: 100
- query.page (integer):  default: 1; minimum: 1; maximum: 10000

### query.type = "records"

- query.type (string; required):  const: "records"
- query.types (array of "post" | "repost" | "like" | "unlike" | "follow" | "unfollow" | "friend" | "unfriend" | "message" | "video"; required):  minItems: 1; maxItems: 10
- query.authorBapId (string):  minLength: 1; maxLength: 128; pattern: "^[a-zA-Z0-9]+$"
- query.address (string):  pattern: "^[123mn][a-km-zA-HJ-NP-Z1-9]{25,34}$"
- query.targetBapId (string):  minLength: 1; maxLength: 128; pattern: "^[a-zA-Z0-9]+$"
- query.txid (string):  pattern: "^[a-f0-9]{64}$"
- query.limit (integer):  default: 20; minimum: 1; maximum: 100
- query.page (integer):  default: 1; minimum: 1; maximum: 10000

### query.type = "videos"

- query.type (string; required):  const: "videos"
- query.txid (string):  pattern: "^[a-f0-9]{64}$"
- query.channel (string):  minLength: 1; maxLength: 256
- query.limit (integer):  default: 20; minimum: 1; maximum: 100
- query.page (integer):  default: 1; minimum: 1; maximum: 10000

Nested requirements apply when their parent is supplied.

### Input schema

```json
{
  "type": "object",
  "properties": {
    "query": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "posts"
            },
            "limit": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "page": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 10000
            },
            "bapId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[a-zA-Z0-9]+$"
            },
            "address": {
              "type": "string",
              "pattern": "^[123mn][a-km-zA-HJ-NP-Z1-9]{25,34}$"
            },
            "feed": {
              "default": false,
              "type": "boolean"
            }
          },
          "required": [
            "type"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "post",
                "replies"
              ]
            },
            "txid": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "limit": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "page": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 10000
            }
          },
          "required": [
            "type",
            "txid"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "search"
            },
            "q": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "limit": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "page": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 10000
            }
          },
          "required": [
            "type",
            "q"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "likes"
            },
            "txid": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "bapId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[a-zA-Z0-9]+$"
            },
            "limit": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "page": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 10000
            }
          },
          "required": [
            "type"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "friends"
            },
            "bapId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[a-zA-Z0-9]+$"
            }
          },
          "required": [
            "type",
            "bapId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "channels"
            }
          },
          "required": [
            "type"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "messages"
            },
            "channel": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "bapId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[a-zA-Z0-9]+$"
            },
            "targetBapId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[a-zA-Z0-9]+$"
            },
            "limit": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "page": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 10000
            }
          },
          "required": [
            "type"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "records"
            },
            "types": {
              "minItems": 1,
              "maxItems": 10,
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "post",
                  "repost",
                  "like",
                  "unlike",
                  "follow",
                  "unfollow",
                  "friend",
                  "unfriend",
                  "message",
                  "video"
                ]
              }
            },
            "authorBapId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[a-zA-Z0-9]+$"
            },
            "address": {
              "type": "string",
              "pattern": "^[123mn][a-km-zA-HJ-NP-Z1-9]{25,34}$"
            },
            "targetBapId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[a-zA-Z0-9]+$"
            },
            "txid": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "limit": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "page": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 10000
            }
          },
          "required": [
            "type",
            "types"
          ],
          "additionalProperties": false,
          "description": "Raw action history, including follow/unfollow and repost records. Filter authorBapId for outgoing follows or targetBapId for incoming follows. This is not a reduced current relationship state."
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "videos"
            },
            "txid": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "channel": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "limit": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "page": {
              "default": 1,
              "type": "integer",
              "minimum": 1,
              "maximum": 10000
            }
          },
          "required": [
            "type"
          ],
          "additionalProperties": false
        }
      ]
    }
  },
  "required": [
    "query"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}
```

[All tools](https://bsvmcp.com/docs/tools)