No API key required

Public Salary API

A free, open JSON API for salary data across 30+ job roles and 50+ countries. CORS-enabled so you can call it directly from any browser or server. Licensed CC BY 4.0.

Base URL

https://salarybyrole.com/api/salary

All requests are GET. No authentication or API key needed. CORS headers are set to Access-Control-Allow-Origin: *.

Endpoints

Salary for a specific role + country

Returns junior, mid, and senior salary bands for one role in one country.

GET /api/salary?role=software-engineer&country=united-states

Both role and country use URL slugs (lowercase, hyphenated). You can find them in any role or country page URL.

All countries for a role

Returns median salary data for a role across up to 50 countries — useful for building global pay charts.

GET /api/salary?role=software-engineer

All roles in a country

Returns median salaries for up to 50 roles in a given country — useful for cost-of-talent dashboards.

GET /api/salary?country=united-states

Usage docs (no parameters)

Returns a JSON object describing available endpoints and example URLs.

GET /api/salary

Example response

Response for /api/salary?role=software-engineer&country=united-states

{
  "source": "SalaryByRole",
  "license": "CC BY 4.0 — please attribute and link back to salarybyrole.com",
  "generated_at": "2026-05-09T12:00:00.000Z",
  "role": {
    "slug": "software-engineer",
    "title": "Software Engineer",
    "category": "Technology"
  },
  "country": {
    "slug": "united-states",
    "name": "United States",
    "currency": "USD",
    "ppp_factor": 1.0
  },
  "salaries": [
    {
      "experience_level": "junior",
      "min": 70000,
      "median": 95000,
      "max": 130000,
      "currency": "USD",
      "year": 2026,
      "source": "BLS, Glassdoor, LinkedIn"
    },
    {
      "experience_level": "mid",
      "min": 100000,
      "median": 135000,
      "max": 175000,
      "currency": "USD",
      "year": 2026,
      "source": "BLS, Glassdoor, LinkedIn"
    },
    {
      "experience_level": "senior",
      "min": 140000,
      "median": 175000,
      "max": 240000,
      "currency": "USD",
      "year": 2026,
      "source": "BLS, Glassdoor, LinkedIn"
    }
  ]
}

Query parameters

ParameterTypeDescription
rolestring (slug)URL slug of the job role, e.g. software-engineer, doctor, nurse. At least one of role or country must be provided.
countrystring (slug)URL slug of the country, e.g. united-states, germany, india. At least one of role or country must be provided.

Usage & attribution

Rate limits:There is no hard rate limit right now, but please keep automated requests to a reasonable volume (< 100 req/min). The API is cached and responses are served from the edge — refreshed hourly. Heavy scraping may be throttled without notice.

License: Salary data is published under Creative Commons Attribution 4.0 (CC BY 4.0). You are free to use and republish the data for any purpose, including commercially, as long as you give credit. Example attribution:

Source: SalaryByRole (https://salarybyrole.com/role/software-engineer)

Data freshness: Salary figures are updated at least monthly. The generated_at field in every response shows the exact timestamp. See the methodology page for full details on sources and update cadence.

API frequently asked questions

No. The salary API is completely open. Just make a GET request to /api/salary with your query parameters — no registration, no header token, no OAuth.