> **For coding agents and LLMs:** This is one Social Fetch marketing page (markdown export). For API orientation start with [`/llms.txt`](https://www.socialfetch.dev/llms.txt); for auth and crawl rules use [`/agents.txt`](https://www.socialfetch.dev/agents.txt); for every operation use [`/llms-endpoints.txt`](https://www.socialfetch.dev/llms-endpoints.txt).

## This page

- **On-site (HTML):** <https://www.socialfetch.dev/platforms/substack/publications-publication-posts-search>
- **Markdown (.mdx) URL:** <https://www.socialfetch.dev/platforms/substack/publications-publication-posts-search.mdx>

---

# Substack Post Search API

Search inside one publication and get the matching posts with highlighted snippets.

`GET /v1/substack/publications/{publication}/posts/search?query=...` searches a publication's posts. `publication` is a subdomain, host or URL; a numeric publication id is refused here. `page` runs from 0 to 20 and returns ten results a page. The query is required and may be up to 200 characters. Substack ranks search results live, so a row can repeat across pages; de-duplicate by `id`.

`data.results[]` pairs a `post` object with `highlights[]`. Each highlight has `segments[]`, and each segment has `text` and `isHighlighted`, so you can render the match without parsing HTML. `data.publications` carries summaries of the publications involved and `data.page` reports `page`, `hasMore` and `nextPage`.

## Request

- **Endpoint:** `GET /v1/substack/publications/{publication}/posts/search`
- **Credits:** 1 credit
Failed requests are free
- **Input:** by subdomain, host or URL and query
- **Full reference:** [docs](https://www.socialfetch.dev/docs/api/v1/substack/publications/publication/posts/search/get)
- **Platform page:** [/platforms/substack](https://www.socialfetch.dev/platforms/substack)

## FAQ

### How are snippets shaped?

`results[].highlights[].segments[]` is a run of text with an `isHighlighted` boolean. Join the segments to rebuild the snippet and style the highlighted runs.

### How many results per page?

Ten. `page` is 0-based and runs to 20. Follow `page.nextPage` while `page.hasMore` is true.

### Is this the same as top search?

No. This route searches one publication. `GET /v1/substack/search` searches across posts, notes and profiles on the whole site.

### How many credits does a search page cost?

Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth.
