News
The News API provides access to current news and announcements from BPS (Badan Pusat Statistik) Indonesia offices across all regions. This API serves as the primary source for official BPS news releases, statistical announcements, policy updates, survey results, and other important communications from Indonesia's national statistical agency.
BPS news content covers a wide range of topics including new statistical releases, policy changes, survey announcements, regional developments, and public information campaigns. This news system enables users to stay informed about the latest statistical developments and BPS activities at national, provincial, and local levels.
Understanding BPS News Content
BPS news serves multiple purposes within Indonesia's statistical ecosystem:
- Statistical Releases: Announcements of new data publications and survey results
- Policy Updates: Information about methodological changes and new statistical initiatives
- Regional News: Local statistical office announcements and regional developments
- Public Information: Educational content and statistical literacy initiatives
- Event Announcements: Information about statistical conferences, training, and workshops
News Organization Structure
BPS news content is systematically organized:
- Geographic Coverage: News from national, provincial, and regency/city BPS offices
- Category Classification: Organized by news types and thematic areas
- Temporal Organization: Filterable by publication year and month
- Content Indexing: Searchable by keywords and topics
- Multimedia Integration: Support for images and visual content
Parameters
Parameter | Type | Description |
---|---|---|
domain | String | Domain code (region) for retrieving news (required) |
lang | DataLanguage | Language for news data (default: DataLanguage.id ) |
page | int | Page number (default: 1 ) |
keyword | String? | Keyword for searching news (optional) |
newsCategoryId | String? | Category ID for filtering news (optional) |
month | int? | Month for filtering news (optional - 1..12 ) |
year | int? | Year for filtering news (optional) |
Examples
1. Get All News from a Domain
// Fetch recent news from Central Java BPS
final newsResult = await StadataFlutter.instance.list.news(
domain: '3300', // Central Java domain code
lang: DataLanguage.id,
);
final newsList = newsResult.data;
final pagination = newsResult.pagination;
// Print pagination information
print('Current Page: ${pagination.page}');
print('Total Pages: ${pagination.pages}');
print('Data Count in This Page: ${pagination.count}');
print('Per Page: ${pagination.perPage}');
print('Total: ${pagination.total}');
print('------------------------');
// Print retrieved news data
for (final news in newsList) {
print('News ID: ${news.id}');
print('Title: ${news.title}');
print('Category: ${news.category ?? 'General'}');
print('Release Date: ${news.releaseDate}');
print('Picture: ${news.picture}');
print('Content Preview: ${news.content.substring(0, 100)}...');
print('------------------------');
}