Detik APIdetik.com ↗
Access Detik.com articles via API. Search by keyword, browse by channel or tag, and extract full article content including author, body text, and publish date.
What is the Detik API?
The Detik.com API gives developers access to Indonesia's leading news portal through 6 endpoints covering search, channel browsing, tag-based filtering, and full article extraction. The get_article_detail endpoint returns the complete article body, author, publish date, image URL, and channel for any Detik.com article URL. Search endpoints return paginated result sets with titles, snippets, publish times, and thumbnail URLs.
curl -X GET 'https://api.parse.bot/scraper/b18c550f-e6bd-4d30-bbf4-25f638307091/search_articles?page=1&query=teknologi&sortby=relevance&include_content=false' \ -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 detik-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.
from parse_apis.detik.com_news_api import Detik, Sort, Channel
detik = Detik()
# Search for technology articles sorted by time
for article in detik.articlesummaries.search(query="teknologi", sortby=Sort.TIME, limit=5):
print(article.title, article.url, article.publish_time)
# Get full content of the first search result
for summary in detik.articlesummaries.search(query="ekonomi", limit=1):
full = summary.details()
print(full.title, full.author, full.publish_date)
# Browse a channel using the Channel enum
for item in detik.detikchannel(Channel.FINANCE).articles.list(limit=3):
print(item.title, item.snippet, item.thumbnail_url)
# Get articles by tag
for item in detik.tag("pemilu").articles.list(limit=5):
print(item.title, item.url)
# Popular headlines
for headline in detik.articlesummaries.popular(limit=10):
print(headline.title, headline.publish_time)
Full-text search over detik.com articles across all channels. Results are paginated and can be sorted by relevance or recency. Optionally fetches full article content for the first 5 results (incurs additional round-trips). Returns article summaries with title, URL, snippet, publish time, channel, and thumbnail.
| Param | Type | Description |
|---|---|---|
| page | integer | Page number for pagination. |
| queryrequired | string | Search keyword. |
| sortby | string | Sort order for results. |
| include_content | boolean | Whether to include full article content for the top 5 results. Each fetched article is an additional request. |
{
"type": "object",
"fields": {
"total": "integer count of articles returned on this page",
"articles": "array of article summary objects with title, url, snippet, publish_time, channel, thumbnail_url"
},
"sample": {
"data": {
"total": 33,
"articles": [
{
"url": "https://news.detik.com/berita/d-8526336/kisruh-pcmb-jabar-pengelolaan-spmb-dialihkan-dari-disdik-ke-diskominfo",
"title": "Kisruh PCMB Jabar, Pengelolaan SPMB Dialihkan dari Disdik ke Diskominfo",
"channel": "",
"snippet": "Gubernur Jabar Dedi Mulyadi alihkan pengelolaan SPMB ke Diskominfo setelah keluhan PCMB 2026.",
"publish_time": "22 menit yang lalu",
"thumbnail_url": "https://akcdn.detik.net.id/community/media/visual/2026/06/09/gubernur-jabar-dedi-mulyadi-di-kantor-disdik-1780985619649_43.jpeg?w=250&q=90"
}
]
},
"status": "success"
}
}About the Detik API
Search and Discovery
The search_articles endpoint accepts a required query string and supports sorting by relevance or time. Set include_content to true to receive full article body text for the top 5 results in a single call, avoiding separate lookups. The search_news_only endpoint targets Detik's news-specific index and always returns results sorted by latest, useful when time-ordered coverage of a breaking topic matters more than relevance ranking. Both endpoints are paginated via the page parameter and return total, title, url, snippet, publish_time, channel, and thumbnail_url per article.
Channel and Tag Browsing
get_channel_articles lets you pull articles from named verticals: news, finance, food, inet, sport, health, travel, and oto. Pagination support varies by channel. get_articles_by_tag takes a tag slug — for example pemilu or teknologi — and returns paginated articles associated with that tag. Both endpoints echo the requested channel or tag name back in the response, making it straightforward to route results in multi-feed pipelines.
Full Article Extraction
get_article_detail takes a full Detik.com article URL and returns title, author, channel, content (the complete body text), image_url, and publish_date. This is the primary endpoint when you need article text rather than just headlines. The get_latest_news endpoint requires no parameters and returns up to 20 popular headlines from across all channels, each with the standard article summary fields.
The Detik API is a managed, monitored endpoint for detik.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when detik.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 detik.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?+
- Monitor Indonesian news coverage of a specific topic by polling
search_articleswith a keyword and sorting bytime. - Build a news aggregator for Detik's
financeorinetchannels usingget_channel_articleswith pagination. - Extract full article text via
get_article_detailfor NLP pipelines such as sentiment analysis or topic modeling on Indonesian-language content. - Track election or political coverage by querying
get_articles_by_tagwith tags likepemiluand storing publish times. - Populate a daily briefing feed using
get_latest_newsto retrieve up to 20 current headlines with thumbnails and channel labels. - Cross-reference author output by extracting the
authorfield from multipleget_article_detailcalls and grouping by byline. - Feed article
snippetandpublish_timedata into a timeline visualization of how a story evolves across Detik's channels.
| 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 Detik.com offer an official developer API?+
What does `get_article_detail` return that search endpoints do not?+
title, url, snippet, publish_time, channel, and thumbnail_url. get_article_detail adds the full content body text, author byline, and a higher-resolution image_url. The include_content flag on search_articles partially bridges this gap but only for the top 5 results per page.Does the API cover all Detik.com channels?+
get_channel_articles supports eight named channels: news, finance, food, inet, sport, health, travel, and oto. Other Detik verticals such as wolipop, hot, or edu are not currently covered. You can fork this API on Parse and revise it to add those missing channels.Is there a way to filter articles by date range?+
search_articles supports sorting by time to surface the most recent results first, and search_news_only always returns results in reverse-chronological order, but neither accepts explicit start or end date parameters. You can fork this API on Parse and revise it to add date-range filtering if the underlying source supports it.How does pagination behave across endpoints?+
page parameter. get_channel_articles notes that pagination support varies by channel, so some channels may not return additional pages beyond the first. get_latest_news accepts no parameters and always returns up to 20 articles with no pagination.