Search

Search posts by keywords in Telegram channels

Changed on

Search across all Telegram channel posts for news, trends, or names mentioned in posts. This is the same search functionality available on https://telemetr.io/en/posts-search

Use quotes for exact phrase matching (e.g., "search this phrase"). Filter results by country, category, or specific channel. Exclude words from post text with a comma-separated exclude_terms parameter, for example ?term=bitcoin&exclude_terms=advertisement,casino. Exclusions do not apply to link fields. Keep them unchanged when requesting the next page. Sort by relevance, date, or views count.

Access and limits

Credits API keys receive message search on Advanced and Team. Successful searches count toward overall request usage and consume credits at the configured endpoint price. The search-request and unique-term rows returned by Usage info are informational for Credits keys.

Subscription API keys use their individually configured message-search permission, search-request quota, and unique-term quota. Repeating the same search phrase counts as additional search requests but does not add another unique term.

get/v1/search/messages

Request

Query parameters

termstring required

Search term.

Use quotes for search phrases. Like "search this phrase"

exclude_termsstring

Terms to exclude from post text, supplied as a comma-separated list.

Example: advertisement,casino. Whitespace around entries is trimmed and empty entries are ignored. Omit to apply no exclusions. Entries use the search service's text matching; this is not a literal substring filter. Link fields are not checked. Keep the same exclusions when using a cursor.

period'7d' | '14d' | '30d' | '60d' | '90d' | 'all'

Search period.

Default: 7 days

countrystring

Channel country.

List of countries can be obtained here /v1/dictionaries/countries

categorystring

Channel category id.

List of categories can be obtained here /v1/dictionaries/categories Example: mf2MkrwoE

on_channelstring

Find channel messages.

Provide channel internal id

return_short_infoboolean

Return info about channels

sort'date' | 'relevance' | 'views'
date_fromstring date-time

Date range start (ISO 8601, e.g. 2024-01-01T00:00:00Z).

If provided together with date_to, overrides period.

date_tostring date-time

Date range end (ISO 8601, e.g. 2024-03-31T23:59:59Z).

If provided together with date_from, overrides period.

cursorstring

Next page cursor.

Response

Messages

countinteger required

Total count

cursorstring nullable

Next page cursor

Changes

    • breaking

      the response's body type changed from object to no type for status

    • breaking

      the response's body type changed from object to no type for status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • info

      added subschema #2 to the response body allOf list for the response status

    • info

      added subschema #2 to the response body allOf list for the response status

    • info

      added the new optional query request parameter exclude_terms

    • info

      added the new optional query request parameter sort

    • info

      added the media type application/json for the response with the status

    • info

      added the non-success response with the status