---
title: "In-channel post search. One upstream lookup, at most 20 results, ranked by relevance across the full channel history"
method: GET
path: "/telegram/channels/{username}/search"
tags: ["Telegram API"]
---

# In-channel post search. One upstream lookup, at most 20 results, ranked by relevance across the full channel history

`GET /telegram/channels/{username}/search`

## Request

- Base URL: `https://scrappa.co/api`
- URL: `https://scrappa.co/api/telegram/channels/{username}/search`
- Auth: API key in header `X-API-KEY`

## Path parameters

- `username` string, required

## Query parameters

- `q` string, required

## Response `200`

- object
  - `success` boolean, required
  - `data` object, required
  - `meta` object, required

## Other responses

- `401`: Unauthorized - API key is missing or invalid
- `422`: The username, post id or search query failed validation. A 422 carries a message and an errors map, and no error code.
- `503`: No usable page came back. The request did not consume a credit. The code varies by failure type: UPSTREAM_HTTP_ERROR when the target answered with a non-successful status, TELEGRAM_DISABLED while the surface is switched off, TRANSPORT_ER...

---

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