@varve/agency-sdks

Find Indicators

Discover World Bank indicators, countries, sources, and topics.

Use the catalogue methods when you need to discover the right indicator before querying observations.

Countries

const countries = await client.getCountries({
  perPage: 100,
  page: 1,
});
 
const usa = await client.getCountry('USA');
const allCountries = await client.getAllCountries();

getAllCountries() follows pagination for you and returns one array.

Indicators

const indicators = await client.getIndicators({
  perPage: 100,
  page: 1,
});
 
const population = await client.getIndicator('SP.POP.TOTL');

Filter the indicator catalogue by source or topic:

const wdiIndicators = await client.getIndicators({
  source: 2,
  perPage: 100,
});
 
const povertyIndicators = await client.getIndicators({
  topic: 11,
  perPage: 100,
});

Sources and topics

const sources = await client.getSources();
const topics = await client.getTopics();

Sources and topics are useful when you want users to browse the indicator universe without knowing World Bank codes ahead of time.

On this page