Documentation / Compare

Compare two periods | Salary Data API

Compare two periods
Starter and above

A series in two periods, with the change between them as published and in today's prices.

GEThttps://api.salarydataapi.com/v1/compare/periods

Try it

Runs against the live API with your key.
curl "https://api.salarydataapi.com/v1/compare/periods" \
  -H "Authorization: Bearer YOUR_KEY"

Parameters

NameTypeWhat it is
seriesidrequired The series (se_...)
fromperiodrequired The earlier period
toperiodThe later period; the latest when left out

Returns

One item in data, with these fields.

FieldTypeWhat it holds
fromobjectThe earlier figure
toobjectThe later figure
changenumberThe difference
change_pctnumberIn per cent
real_change_pctnumberIn per cent, after prices

Example answer

Run it with your key for a real answer.

Errors