Skip to main content
Version: latest

SDG Indicators

The SDG Indicators API provides access to Sustainable Development Goals (SDGs) indicator data from the BPS (Badan Pusat Statistik) API. Each entry represents a statistical indicator variable associated with a specific SDG goal (1–17).

Parameters

ParameterTypeDefaultDescription
domainStringRequiredBPS domain code (e.g. '0000' for national)
goalSdgGoalNumberRequiredThe SDG goal to filter indicators by — see Goal Reference below
langDataLanguageDataLanguage.idResponse language — DataLanguage.id or DataLanguage.en
pageint1Page number for pagination

Goal Reference

goal takes a SdgGoalNumber enum member instead of a raw 117 integer, so you don't need to memorize which number maps to which goal:

SdgGoalNumber memberGoal #Official title
noPoverty1No Poverty
zeroHunger2Zero Hunger
goodHealth3Good Health and Well-being
qualityEducation4Quality Education
genderEquality5Gender Equality
cleanWater6Clean Water and Sanitation
affordableEnergy7Affordable and Clean Energy
decentWork8Decent Work and Economic Growth
industry9Industry, Innovation and Infrastructure
reducedInequalities10Reduced Inequalities
sustainableCities11Sustainable Cities and Communities
responsibleConsumption12Responsible Consumption and Production
climateAction13Climate Action
lifeBelowWater14Life Below Water
lifeOnLand15Life on Land
peace16Peace, Justice and Strong Institutions
partnerships17Partnerships for the Goals

Examples

1. Get SDG Indicators for Goal 1 (No Poverty)

final result = await StadataFlutter.instance.list.sdgIndicators(
domain: '0000',
goal: SdgGoalNumber.noPoverty,
);

for (final indicator in result.data) {
print('${indicator.id}: ${indicator.title} (${indicator.unit})');
print('Goal: ${indicator.goalName}');
print('SDGs ID: ${indicator.sdgsId}');
}

2. Get SDG Indicators in English

final result = await StadataFlutter.instance.list.sdgIndicators(
domain: '0000',
goal: SdgGoalNumber.goodHealth,
lang: DataLanguage.en,
);

3. Paginated Fetch

final result = await StadataFlutter.instance.list.sdgIndicators(
domain: '0000',
goal: SdgGoalNumber.affordableEnergy,
page: 2,
);

Properties

PropertyTypeDescription
idintUnique identifier of the SDG indicator variable (var_id)
titleStringOfficial title of the SDG indicator variable
goalStringSDG goal code, e.g. "sdgs_1" (sdgs_goal)
goalNameStringHuman-readable SDG goal name, e.g. "1. Tanpa Kemiskinan" (sdgs_goal_name)
sdgsIdStringSDG indicator reference code, e.g. "1.2.1*" (sdgs_id)
subjectIdintIdentifier of the statistical subject this indicator belongs to (sub_id)
subjectNameStringName of the statistical subject (sub_name)
unitStringUnit of measurement for the indicator values
definitionStringDefinition or description of the indicator (def)
notesStringMethodological notes, may contain HTML content
verticalVariableIdintIdentifier linking to the associated vertical variable (vertical)
graphIdintIdentifier for the chart/graph type (graph_id)
graphNameStringName of the chart/graph type, e.g. "bar" (graph_name)
metaActivityString?URL to the activity metadata in SIRUSA (meta_activity), may be null
metaVarString?URL to the variable metadata in SIRUSA (meta_var), may be null

Error Handling

try {
final result = await StadataFlutter.instance.list.sdgIndicators(
domain: '0000',
goal: SdgGoalNumber.noPoverty,
);
print('Found ${result.data.length} indicators');
} on SdgException catch (e) {
print('SDG error: ${e.message}');
} catch (e) {
print('Unexpected error: $e');
}

See Also