# community.gifthood.feed.getListings

> Published by [gifthood.community](https://lexicon.garden/identity/did:plc:7prvtl4j6wsfmkrfrnwknuxj)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:7prvtl4j6wsfmkrfrnwknuxj/community.gifthood.feed.getListings)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7prvtl4j6wsfmkrfrnwknuxj/community.gifthood.feed.getListings/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7prvtl4j6wsfmkrfrnwknuxj/community.gifthood.feed.getListings/examples)

## Definitions

### `community.gifthood.feed.getListings`

**Type**: `query`

Fetch listings near a geohash cell, optionally filtered by intent. Returns a page of listingView objects ordered newest-first.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `mode` | `string` | No | When supplied, returns only listings of this mode ("lend" = the Borrow feed segment). Omitted returns both. |
| `limit` | `integer` | No | Maximum number of listings to return. Defaults to 50; hard cap 100. |
| `intent` | `string` | No | When supplied, returns only listings of this intent type. |
| `geohash` | `string` | Yes | The caller's geohash cell. The server truncates this to `precision` characters before querying. |
| `precision` | `integer` | No | Display and query precision (number of geohash characters). Lower values widen the search area. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `area` | `ref` → `community.gifthood.geo.defs#area` | No | The resolved label for the queried (effective) cell — for the feed header. Optional/additive. |
| `cursor` | `string` | No | Opaque keyset cursor for fetching the next page. Absent when no further results exist. |
| `listings` | `array` | Yes |  |

## Raw Schema

```json
{
  "id": "community.gifthood.feed.getListings",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "listings"
          ],
          "properties": {
            "area": {
              "ref": "community.gifthood.geo.defs#area",
              "type": "ref",
              "description": "The resolved label for the queried (effective) cell — for the feed header. Optional/additive."
            },
            "cursor": {
              "type": "string",
              "description": "Opaque keyset cursor for fetching the next page. Absent when no further results exist."
            },
            "listings": {
              "type": "array",
              "items": {
                "ref": "community.gifthood.feed.defs#listingView",
                "type": "ref"
              }
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "geohash"
        ],
        "properties": {
          "mode": {
            "enum": [
              "gift",
              "lend"
            ],
            "type": "string",
            "description": "When supplied, returns only listings of this mode (\"lend\" = the Borrow feed segment). Omitted returns both."
          },
          "limit": {
            "type": "integer",
            "default": 50,
            "maximum": 100,
            "minimum": 1,
            "description": "Maximum number of listings to return. Defaults to 50; hard cap 100."
          },
          "intent": {
            "enum": [
              "offer",
              "request"
            ],
            "type": "string",
            "description": "When supplied, returns only listings of this intent type."
          },
          "geohash": {
            "type": "string",
            "description": "The caller's geohash cell. The server truncates this to `precision` characters before querying."
          },
          "precision": {
            "type": "integer",
            "maximum": 12,
            "minimum": 1,
            "description": "Display and query precision (number of geohash characters). Lower values widen the search area."
          }
        }
      },
      "description": "Fetch listings near a geohash cell, optionally filtered by intent. Returns a page of listingView objects ordered newest-first."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
