{"id":"e54381ef-3f16-4d1c-b043-380d5f2548d8","slug":"tgstat-api","name":"TGStat API","description":"Extract Telegram channel listings, ratings, and profile data from TGStat.","front_facing_description":"Search and discover Telegram channels and groups by keyword or category, view detailed channel ratings and performance metrics, and access comprehensive profile information including subscriber counts and engagement data. Monitor top-performing channels and groups to find the most popular content across categories and regions.","source_url":"https://in.tgstat.com","is_authenticated":false,"canonical_scraper_id":"ebf74fe8-f81a-4263-8013-8aa752ee2694","apis":[{"method":"POST","endpoint_name":"search_channels","description":"Full-text search over Telegram channels with filters for country, category, and sort order. Returns a paginated list of channel summaries. Pagination advances via the integer page counter returned in nextPage. Each result includes the channel name, handle, and subscriber count but not full profile details — use get_channel_profile for those.","input_params":{"page":{"type":"integer","required":false,"description":"Pagination page number (zero-based), use nextPage from previous response to get next page of results","default":0,"domain":{"kind":"open","example":"0","generator":{"type":"static","value":"0"}}},"sort":{"type":"string","required":false,"description":"Sort order for results","default":"participants","enum":"SearchSort","domain":{"kind":"enum","values":["participants","avg_reach","ci_index","members_t","members_y","members_7d","members_30d"],"generator":{"type":"enum_pick","strategy":"first"}}},"query":{"type":"string","required":false,"description":"Keyword to search for in channel name or description","domain":{"kind":"open","example":"education","generator":{"type":"static","value":"education"}}},"country":{"type":"integer","required":false,"description":"Country ID to filter results by (e.g. 8 for India, 1 for Russia). Omit to search globally.","domain":{"kind":"open","example":"8","generator":{"type":"static","value":"8"}}},"category":{"type":"string","required":false,"description":"Category name to filter by (e.g. education, cryptocurrencies, news)","domain":{"kind":"large_enum","example":"education","generator":{"type":"static","value":"education"}}}},"return_schema":{"type":"object","fields":{"hasMore":"boolean indicating if more results are available","channels":"array of channel summary objects with name, handle, tgstat_id, and subscribers fields","nextPage":"integer page number for fetching next page of results","nextOffset":"integer offset for next page"},"sample":{"data":{"hasMore":true,"channels":[{"name":"Rajasthan Vacancy Education News","handle":"@rajasthanvacancy_in","tgstat_id":null,"subscribers":"575 265"}],"nextPage":1,"nextOffset":30},"status":"success"}},"initiates_session":false,"price":2,"verification":{"assertions":[{"path":"$.status","op":"equals","value":"success"},{"path":"$.data.channels","op":"array_min_len","value":1},{"path":"$.data.channels[0].handle","op":"not_null"}],"empty_is_valid":false,"recipe_version":1}},{"method":"GET","endpoint_name":"get_ratings_channels","description":"Ranked list of top Telegram channels by subscribers or reach. Supports category filtering. Returns a single page of channel summaries ordered by the chosen sort metric. Categories are path-based slugs matching TGStat's taxonomy.","input_params":{"sort":{"type":"string","required":false,"description":"Sort order. Known working values: members, reach","domain":{"kind":"open","example":"members","generator":{"type":"static","value":"members"}}},"category":{"type":"string","required":false,"description":"Category name to filter by (e.g. education, news, blogs, cryptocurrencies)","domain":{"kind":"large_enum","example":"education","generator":{"type":"static","value":"education"}}}},"return_schema":{"type":"object","fields":{"channels":"array of channel summary objects with name, handle, tgstat_id, and subscribers fields"},"sample":{"data":{"channels":[{"name":"Maths By Gagan Pratap","handle":"@mathsbygaganpratap","tgstat_id":null,"subscribers":"2 181 627"}]},"status":"success"}},"initiates_session":false,"price":1,"verification":{"assertions":[{"path":"$.status","op":"equals","value":"success"},{"path":"$.data.channels","op":"array_min_len","value":1},{"path":"$.data.channels[0].name","op":"not_null"}],"empty_is_valid":false,"recipe_version":1}},{"method":"GET","endpoint_name":"get_ratings_groups","description":"Ranked list of top Telegram groups (chats) by member count. Supports category filtering. Returns a single page of group summaries. Groups differ from channels in that they support two-way communication among members.","input_params":{"sort":{"type":"string","required":false,"description":"Sort order. Known working value: members","domain":{"kind":"open","example":"members","generator":{"type":"static","value":"members"}}},"category":{"type":"string","required":false,"description":"Category name to filter by (e.g. education, news)","domain":{"kind":"large_enum","example":"education","generator":{"type":"static","value":"education"}}}},"return_schema":{"type":"object","fields":{"groups":"array of group summary objects with name, handle, tgstat_id, and subscribers fields"},"sample":{"data":{"groups":[{"name":"STOCK MARKET TRADING TIPS","handle":"@Trading_Share_Market_28","tgstat_id":null,"subscribers":""}]},"status":"success"}},"initiates_session":false,"price":1,"verification":{"assertions":[{"path":"$.status","op":"equals","value":"success"},{"path":"$.data.groups","op":"array_min_len","value":1},{"path":"$.data.groups[0].handle","op":"not_null"}],"empty_is_valid":false,"recipe_version":1}},{"method":"GET","endpoint_name":"get_channel_profile","description":"Detailed public profile for a single Telegram channel. Returns the display title, description, subscriber metrics, category, geo/language information, and the TGStat profile URL. The metrics and info fields are open dictionaries whose keys depend on the channel's available data.","input_params":{"username":{"type":"string","required":true,"description":"Telegram handle (with or without @ prefix, e.g. 'durov' or '@durov')","domain":{"kind":"open","example":"durov","generator":{"type":"static","value":"durov"}}}},"return_schema":{"type":"object","fields":{"url":"string TGStat profile URL for this channel","info":"object containing category, geo/language, and other channel metadata as string values","title":"string channel display name","handle":"string Telegram handle with @ prefix","metrics":"object containing subscriber count and other available metrics as string values","tgstat_id":"string internal TGStat identifier","description":"string channel description text"},"sample":{"data":{"url":"https://tgstat.com/channel/@durov","info":{"category":"Telegram","channel's_geo_and_language":"World, English"},"title":"Pavel Durov","handle":"@durov","metrics":{"subscribers":"11 041 863"},"tgstat_id":"2984","description":"Founder of Telegram."},"status":"success"}},"initiates_session":false,"price":1,"verification":{"assertions":[{"path":"$.status","op":"equals","value":"success"},{"path":"$.data.title","op":"not_null"},{"path":"$.data.handle","op":"not_null"}],"empty_is_valid":false,"recipe_version":1}}],"sample_inputs":{"search_channels":{"page":"0","sort":"participants","query":"education","country":"8","category":"education"},"get_ratings_groups":{"sort":"members","category":"education"},"get_channel_profile":{"username":"durov"},"get_ratings_channels":{"sort":"members","category":"education"}},"prefill_inputs":{"search_channels":{"page":"0","sort":"participants","query":"education","country":"8","category":"education"},"get_ratings_channels":{"sort":"members","category":"education"},"get_ratings_groups":{"sort":"members","category":"education"},"get_channel_profile":{"username":"durov"}},"last_verified_at":"2026-10-26T14:04:25.20956+00:00","endpoint_health":[{"endpoint_name":"get_ratings_groups","status":"healthy","last_checked_at":"2026-10-26T14:04:25.20956+00:00","last_verified_at":"2026-10-26T14:04:25.20956+00:00","recent_runs":[{"at":"2026-10-26T14:04:25.209560+00:00","status":"healthy"},{"at":"2026-10-26T08:02:52.903289+00:00","status":"ambiguous"},{"at":"2026-10-26T01:02:52.893507+00:00","status":"ambiguous"},{"at":"2026-10-25T18:01:52.876889+00:00","status":"ambiguous"},{"at":"2026-10-25T11:00:25.182824+00:00","status":"ambiguous"}]},{"endpoint_name":"get_ratings_channels","status":"healthy","last_checked_at":"2026-10-26T14:04:25.20956+00:00","last_verified_at":"2026-10-26T14:04:25.20956+00:00","recent_runs":[{"at":"2026-10-26T14:04:25.209560+00:00","status":"healthy"},{"at":"2026-10-26T08:02:52.903289+00:00","status":"ambiguous"},{"at":"2026-10-26T01:02:52.893507+00:00","status":"ambiguous"},{"at":"2026-10-25T18:01:52.876889+00:00","status":"ambiguous"},{"at":"2026-10-25T11:00:25.182824+00:00","status":"ambiguous"}]},{"endpoint_name":"get_channel_profile","status":"healthy","last_checked_at":"2026-10-26T14:04:25.20956+00:00","last_verified_at":"2026-10-26T14:04:25.20956+00:00","recent_runs":[{"at":"2026-10-26T14:04:25.209560+00:00","status":"healthy"},{"at":"2026-10-26T08:02:52.903289+00:00","status":"ambiguous"},{"at":"2026-10-26T01:02:52.893507+00:00","status":"ambiguous"},{"at":"2026-10-25T18:01:52.876889+00:00","status":"ambiguous"},{"at":"2026-10-25T11:00:25.182824+00:00","status":"ambiguous"}]}],"sdk_usage_example":{"code":"\"\"\"Walkthrough: TGStat SDK — search channels, view ratings, get profiles.\"\"\"\nfrom parse_apis.tgstat_api import TGStat, SearchSort, ChannelNotFound\n\nclient = TGStat()\n\n# Search for education channels in India, sorted by subscribers\nfor ch in client.channelsummaries.search(query=\"education\", country=8, sort=SearchSort.PARTICIPANTS, limit=5):\n    print(ch.name, ch.subscribers)\n\n# Get top-rated channels in the education category\ntop = client.channelsummaries.rated(category=\"education\", sort=\"members\", limit=3).first()\nif top:\n    print(top.name, top.handle, top.subscribers)\n\n    # Drill into full profile from a summary\n    profile = top.details()\n    print(profile.title, profile.metrics, profile.info)\n\n# List top groups by members\nfor group in client.groupsummaries.rated(sort=\"members\", limit=3):\n    print(group.name, group.handle)\n\n# Handle a channel that doesn't exist\ntry:\n    missing = client.channelsummaries.search(query=\"zzz_nonexistent_xyz\", limit=1).first()\n    if missing:\n        missing.details()\nexcept ChannelNotFound as exc:\n    print(f\"Channel not found: {exc.username}\")\n\nprint(\"exercised: channelsummaries.search / channelsummaries.rated / details / groupsummaries.rated\")","shape":"parse_sdk","endpoints":["search_channels","get_ratings_channels","get_ratings_groups","get_channel_profile"],"has_session":false,"hover_map":[{"line":7,"col":4,"len":2,"label":"ch: ChannelSummary","kind":"variable"},{"line":4,"col":9,"len":6,"label":"TGStat — API client","kind":"class"},{"line":7,"col":34,"len":6,"label":"search() → List[ChannelSummary]","kind":"method"},{"line":16,"col":4,"len":7,"label":"profile: Channel","kind":"variable"},{"line":25,"col":4,"len":7,"label":"missing: ChannelSummary","kind":"variable"},{"line":26,"col":7,"len":7,"label":"missing: ChannelSummary","kind":"variable"},{"line":28,"col":7,"len":15,"label":"ChannelNotFound — error (404): The requested channel handle does not exist or has been removed (upstream 404/410)","kind":"error"},{"line":7,"col":87,"len":12,"label":"SearchSort.PARTICIPANTS","kind":"enum-member"},{"line":8,"col":13,"len":4,"label":"name: str","kind":"field"},{"line":8,"col":22,"len":11,"label":"subscribers: str","kind":"field"},{"line":16,"col":18,"len":7,"label":"details() → Channel","kind":"method"},{"line":17,"col":18,"len":5,"label":"title: str","kind":"field"},{"line":17,"col":33,"len":7,"label":"metrics: Dict[str, str]","kind":"field"},{"line":17,"col":50,"len":4,"label":"info: Dict[str, str]","kind":"field"},{"line":7,"col":76,"len":10,"label":"SearchSort — enum: AVG_REACH, CI_INDEX, MEMBERS_30D, MEMBERS_7D, MEMBERS_TODAY, MEMBERS_YESTERDAY…","kind":"enum"},{"line":8,"col":10,"len":2,"label":"ch: ChannelSummary","kind":"variable"},{"line":8,"col":19,"len":2,"label":"ch: ChannelSummary","kind":"variable"},{"line":17,"col":10,"len":7,"label":"profile: Channel","kind":"variable"},{"line":17,"col":25,"len":7,"label":"profile: Channel","kind":"variable"},{"line":17,"col":42,"len":7,"label":"profile: Channel","kind":"variable"},{"line":27,"col":16,"len":7,"label":"details() → Channel","kind":"method"},{"line":25,"col":38,"len":6,"label":"search() → List[ChannelSummary]","kind":"method"},{"line":27,"col":8,"len":7,"label":"missing: ChannelSummary","kind":"variable"},{"line":29,"col":32,"len":3,"label":"exc: ChannelNotFound","kind":"variable"}]},"sdk_delivery_state":"legacy","summary":"Search and discover Telegram channels and groups with ratings, metrics, and detailed profile information from TGStat India.","updated_at":"2026-07-23T02:49:20.545187+00:00","user_variants":[],"latest_version":6,"user_status":null,"user_scraper_id":null,"contributes_to_marketplace":true,"pinned_version":null,"seo_content":{"faqs":[{"a":"Yes. TGStat publishes an official API documented at https://tgstat.com/en/api/docs. It requires registration and provides token-authenticated access to channel statistics. This Parse API covers the discovery and profile endpoints from TGStat's India-facing site and does not require you to manage TGStat API credentials.","q":"Does TGStat have an official developer API?"},{"a":"It returns `title`, `description`, `handle`, `tgstat_id`, a TGStat `url`, and two open-schema objects: `metrics` (subscriber count and other quantitative values) and `info` (category, geo, language). The available keys inside `metrics` and `info` vary by channel — fields are present only when TGStat has indexed them for that channel, so sparse profiles will return fewer keys.","q":"What does `get_channel_profile` return, and how complete is the data?"},{"a":"Yes. The `country` parameter in `search_channels` accepts any integer country ID — pass 8 for India or 1 for Russia, for example. Omitting the parameter searches globally across all TGStat-indexed channels.","q":"Can I filter search results by a specific country other than India?"},{"a":"Not currently. The API covers current subscriber counts, reach rankings, and static profile metadata. Historical time-series data and individual post metrics are not included in any of the 4 endpoints. You can fork this API on Parse and revise it to add an endpoint targeting those profile sections if the data is available on TGStat's public pages.","q":"Does the API return historical subscriber growth or post-level engagement data?"},{"a":"Each `search_channels` response includes a `hasMore` boolean and a `nextPage` integer. Pass `nextPage` as the `page` parameter in your next request to retrieve the following page. The API does not expose a configurable page-size parameter, so page size is fixed by the source.","q":"How does pagination work for `search_channels`, and is there a limit on results per page?"}],"keywords":["TGStat API","Telegram channel search API","Telegram channel metrics API","Telegram group rankings API","Telegram subscriber count API","TGStat India channel data","Telegram channel discovery API","Telegram channel profile API","Telegram channel category filter API","Telegram reach ranking API","TGStat channel ratings","Telegram group member count API","Telegram channel geo data API","Telegram influencer research API"],"use_cases":["Build a Telegram channel discovery tool filtered by Indian category and subscriber threshold using `search_channels` with country ID 8.","Track ranking shifts for news or crypto channels week-over-week by polling `get_ratings_channels` with different `sort` values.","Identify top Telegram groups in a niche category for community research using `get_ratings_groups` with a `category` filter.","Enrich a CRM or influencer database with Telegram channel descriptions and subscriber counts via `get_channel_profile`.","Compare reach vs. member-count rankings for the same category by calling `get_ratings_channels` twice with `sort=reach` and `sort=members`.","Automate alerts when new channels appear for a keyword by paginating `search_channels` and comparing `tgstat_id` sets over time."],"meta_title":"TGStat India API – Telegram Channel & Group Data","generated_at":"2026-06-11T10:03:23.024640+00:00","lead_paragraph":"The TGStat India API exposes 4 endpoints for discovering and profiling Telegram channels and groups. Use `search_channels` to run full-text searches across Telegram with filters for country, category, and sort order, or call `get_channel_profile` to retrieve a channel's title, description, subscriber metrics, category, and geo/language metadata for any public Telegram handle.","schema_version":2,"meta_description":"Search Telegram channels and groups, retrieve ranked lists, and fetch detailed channel profiles including subscriber counts and category metadata via the TGStat India API.","primary_category":"social_media","long_description_md":"## Search and Discovery\n\nThe `search_channels` endpoint accepts a `query` string and optional filters including `country` (integer ID, e.g. 8 for India), `category` (slug such as `education` or `cryptocurrencies`), and `sort`. Results are paginated: each response includes a `hasMore` boolean, a `nextPage` integer, and an array of channel objects containing `name`, `handle`, `tgstat_id`, and `subscribers`. Pass `nextPage` back as the `page` parameter to advance through results.\n\n## Channel and Group Rankings\n\n`get_ratings_channels` returns a ranked list of top Telegram channels filtered by `category` and ordered by `sort` (supported values: `members`, `reach`). Each entry in the `channels` array carries the same summary shape as search results. `get_ratings_groups` works analogously for Telegram groups — two-way communication chats rather than broadcast channels — returning a `groups` array sorted by member count, with optional `category` filtering.\n\n## Channel Profile Detail\n\n`get_channel_profile` takes a single `username` parameter (with or without the `@` prefix) and returns the most granular data available: `title`, `description`, `handle`, `tgstat_id`, a `url` pointing to the TGStat profile page, and two open-schema objects. The `metrics` object holds subscriber count and other quantitative values whose keys vary by channel. The `info` object holds category, geo, and language metadata. Because both are open dictionaries, available keys depend on what TGStat has indexed for that channel.","generated_with_model":"global.anthropic.claude-sonnet-4-6","secondary_categories":["news_media","b2b_directory"]},"primary_category":"social_media","secondary_categories":["news_media","b2b_directory"],"access_requirements":[]}