---
title: "Search public posts"
method: GET
path: "/v1/discover/posts"
tags: ["Discovery"]
---

# Search public posts

`GET /v1/discover/posts`

## Request

- Base URL: `https://api.postlake.dev`
- URL: `https://api.postlake.dev/v1/discover/posts`
- Auth: `bearerAuth` (a scheme the document does not define)

Search the network itself rather than your own posts, so an agent can see what is already being said before it writes. Runs on every connected network that supports searching; the ones that cannot are named in `problems`. Two limits decide whether a result means anything on Instagram, and neither is a rate limit you can retry past. Instagram has NO keyword search: a multi-word query cannot match a hashtag and comes back as a `problems` entry rather than an empty list. And Meta caps this at 30 UNIQUE hashtags per account per 7 days, so a scouting run has a weekly budget. `sort=recent` reads Meta's recent_media edge, which only covers the last 24 hours, so an empty recent result means nothing was posted today rather than that the tag is unused. Instagram results also carry `authorHidden: true` and can never name their author: Meta strips personally identifiable information from them, so post search cannot be used to find someone to contact.

## Query parameters

- `q` string, required
- `mode` 'keyword' | 'tag'
- `sort` 'top' | 'recent'
- `mediaType` 'text' | 'image' | 'video'
- `author` string
- `since` string, date-time
- `until` string, date-time
- `account` string
- `cursor` string
- `limit` integer

## Response `200`

Success

- object
  - `items` DiscoveredPost[]
    - `id` string
    - `platform` string
    - `author` SocialActor
      - `handle` string
      - `displayName` string, nullable
      - `avatarUrl` string, nullable
      - `id` string, nullable: The network's own id, for follow/block/mute
    - `text` string
    - `createdAt` string, date-time
    - `url` string, nullable
    - `mediaType` 'text' | 'image' | 'video' | 'other': 'other' keeps a new network media type from breaking a parser that switches on this.
    - `isReply` boolean
    - `isQuote` boolean
    - `authorHidden` boolean: True when the network REFUSES to name the author, as opposed to us failing to read it. Instagram hashtag results are the case: Meta rejects the username field on media returned by a tag search, so author.handle is necessarily empty. Treat an empty handle WITHOUT this flag as a bug; with it, as the network's rule.
  - `cursor` string, nullable: Opaque. Pass it back verbatim; null means the end.
  - `problems` ReadProblem[]
    - `account` string
    - `platform` string
    - `reason` string

---

[API](https://skmtc.dev/postlake/apis/postlake-api.md) · [All operations](https://skmtc.dev/postlake/apis/postlake-api/llms.txt) · [OpenAPI document](https://skmtc.dev/postlake/apis/postlake-api/revisions/f81060e31f69?raw)
