QQ APIqq.com ↗
Access QQ News articles, trending topics, stock indices, sports schedules, and category feeds via 12 structured endpoints covering qq.com and QQ News.
What is the QQ API?
The QQ.com API exposes 12 endpoints covering the qq.com homepage, QQ News articles, category feeds, hot topics, stock market indices, and sports match schedules. Use get_article to fetch full article text and images from a given URL, get_stock_indices to retrieve live prices and changes for nine major indices including the Shanghai Composite and Nasdaq, or search_news to query QQ News by keyword with paginated, sectioned results.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/1f07493c-d9a8-455a-9a18-6f954096105b/get_homepage' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace qq-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""QQ News API — homepage, articles, stock indices, hot topics, and news search."""
from parse_apis.qq_news_api import QQNews, Category, CompetitionId, ArticleNotFound
client = QQNews()
# Get homepage content with typed links and images
homepage = client.homepages.get()
print(f"Homepage: {len(homepage.links)} links, {len(homepage.images)} images")
for link in homepage.links[:3]:
print(f" {link.text} → {link.url}")
# List current stock market indices
for idx in client.stockindexes.list(limit=5):
print(f" {idx.name} ({idx.code}): {idx.current} | {idx.change} ({idx.percent}%)")
# Search news by keyword
results = client.searchresponses.search(query="科技")
print(f"Search: ret={results.ret}, total={results.total_num}")
# Get hot topics ranking
ranking = client.hottopicrankings.get()
print(f"Hot topics: ret={ranking.ret}")
# Get category news feed
feed = client.categoryfeeds.get(category=Category.TECH)
print(f"Category feed: code={feed.code}")
# Fetch a full article by URL — typed error if not found
try:
article = client.articles.get(url="https://view.inews.qq.com/a/20260611A08M0B00")
print(f"Article: {article.title}, images: {len(article.images)}")
except ArticleNotFound as exc:
print(f"Article not found: {exc.url}")
print("Exercised: homepages.get / stockindexes.list / searchresponses.search / hottopicrankings.get / categoryfeeds.get / articles.get")
Extracts structured content from the qq.com homepage including navigation links, images, and text elements. Returns all anchor-tag links with their text and URL, all images with source URLs, alt text, and parent context, and text strings from link elements. Headlines and sections arrays may be empty depending on current page structure.
No input parameters required.
{
"type": "object",
"fields": {
"links": "array of link objects with text and url fields",
"images": "array of image objects with url, alt, and context fields",
"sections": "array of section identifiers (may be empty)",
"headlines": "array of headline strings (may be empty)",
"text_elements": "array of text strings extracted from links on the page"
},
"sample": {
"data": {
"links": [
{
"url": "https://mail.qq.com/",
"text": "邮箱"
},
{
"url": "https://news.qq.com/",
"text": "要闻"
}
],
"images": [
{
"alt": "",
"url": "https://inews.gtimg.com/news_ls/O-DHEglAZvzbTlt42LxeBz1P__7qyHlXCwKEcKqfoCswcAA_870492/0",
"context": ""
}
],
"sections": [],
"headlines": [],
"text_elements": [
"邮箱",
"要闻",
"科技"
]
},
"status": "success"
}
}About the QQ API
Homepage and Content Discovery
Three endpoints slice the qq.com homepage into different shapes. get_homepage returns the full structured payload: a links array of anchor text and URL pairs, an images array with url, alt, and context fields, plus sections and headlines arrays. get_homepage_links and get_homepage_text return those subsets independently — useful when you need only navigation labels or only the link graph. get_homepage_images returns the same image array in isolation, giving each image's source URL, alt attribute, and the text from its surrounding element.
News Articles and Search
get_article accepts a full article URL (typically https://view.inews.qq.com/a/<article_id>) and returns the article title, content body text, and an images array of embedded image URLs. Note that heavily JS-rendered articles may return an empty content string. search_news accepts a query string and an optional zero-based page integer; the response groups results into secList sections covering standard articles, video, and accounts, and includes hasMore and total_num fields for pagination. get_category_news accepts a category channel ID (e.g., news_news_tech for technology, news_news_sports for sports) and returns hot_module and collection_article arrays with titles, URLs, thumbnails, publish times, and interaction counts.
Trending Topics and Broadcasts
get_hot_topics returns ranked trending articles via an idlist structure containing newslist arrays; each item carries hotEvent metadata with ranking position, hot score, read count, and comment count. The optional offset parameter supports pagination through the ranking. get_today_hot_broadcast narrows this to the top 10 broadcast items, returning a broadcasts array where each object includes title, url, and a hot_event field with ranking position, hot score, and associated search keywords. get_evening_report filters homepage links for items containing '晚报' and returns matching link objects; the array may be empty if no evening report links appear at request time.
Finance and Sports
get_stock_indices returns a fixed set of nine major indices — Shanghai Composite (000001), Shenzhen Component (399001), ChiNext (399006), STAR 50 (000688), CSI 300 (000300), Hang Seng, Dow Jones, Nasdaq, and S&P 500 — each with name, code, current price, change amount, and percent change. get_sports_schedule fetches match data from QQ Sports; the optional competition_id parameter accepts known values like 100000 for NBA. Each match object includes team names, scores, start times, competition metadata, and live streaming details.
The QQ API is a managed, monitored endpoint for qq.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when qq.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official qq.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Aggregate Chinese and global stock index movements using the nine indices returned by
get_stock_indices. - Build a keyword news monitor by polling
search_newswith a query term and tracking changes intotal_numand article abstracts over time. - Track NBA match schedules and scores by calling
get_sports_schedulewith competition_id100000. - Collect trending article titles and hot scores from
get_hot_topicsto analyse what news dominates Chinese media at a given time. - Discover visual editorial choices on qq.com by extracting the
imagesarray fromget_homepage_imagesto track thumbnail usage patterns. - Pull the full text of individual QQ News articles using
get_articlefor content archiving or downstream NLP pipelines. - Monitor technology or sports category feeds via
get_category_newsto track curated articles and interaction counts by channel.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does QQ.com have an official public developer API?+
What does `get_category_news` return and which category IDs are supported?+
data array of channel objects, each containing hot_module (trending articles) and collection_article (curated videos and articles) arrays. Each item includes title, URL, thumbnail, publish time, and interaction counts. Documented category values include news_news_tech (technology) and news_news_sports (sports). Other channel IDs may work if you know the internal channel slug, but only these two are confirmed in the current spec.Can `get_article` always return full article body text?+
content field may be empty for articles that rely heavily on client-side JavaScript rendering. The endpoint works reliably with standard view.inews.qq.com article URLs, but some article formats will return a title and images with no body text. Plan for empty content in your parsing logic.Does the API cover QQ Video, QQ Music, or Tencent News mobile app content?+
How does pagination work in `search_news` and `get_hot_topics`?+
search_news uses a zero-based page integer parameter; check the hasMore field (1 means more results exist) and total_num for result size. get_hot_topics uses an offset integer parameter to step through the ranked list. Neither endpoint documents a hard page-size value in the spec, so you should step until hasMore is 0 or the returned list is empty.