Partager via


States

States taxonomy is used to standardize data across the LinkedIn platform. Use this API to retrieve standardized URNs and their names.

Supported Methods

GET | BATCH_GET | GET_ALL | FINDER country

State Schema

Field Name Description
country The country/region URN that owns the state.
$URN Standardized state URN
name State name in various locales. Represented as  LocaleString type.
stateCode The state code.

GET

GET https://api.linkedin.com/v2/states/country={countryURN}&stateCode={stateCode}?locale.language=en&locale.country=US

Parameters

Field Name Sub-Field Name Description
locale   The locale the state data is requested in. "en_US" locale will be used if locale is not provided or not supported.
  language A lowercase two-letter language code as defined by  ISO-639 .
  country An uppercase two-letter country code as defined by  ISO-3166 .

Sample Response

{
    "$URN": "urn:li:state:(urn:li:country:us,CA)",
    "country": "urn:li:country:us",
    "name": {
        "locale": {
            "country": "US",
            "language": "en"
        },
        "value": "California"
    },
    "stateCode": "CA"
}

BATCH GET

GET https://api.linkedin.com/v2/states?ids[0].country={countryURN0}&ids[0].stateCode={stateCode0}&ids[1].country={countryURN1}&ids[1].stateCode={stateCode1}&ids[2].country={countryURN2}&ids[2].stateCode={stateCode2}

Parameters

Field Name Sub-Field Name Description
locale   The locale the seniority data is requested in. "en_US" locale will be used if locale is not provided or not supported.
  language A lowercase two-letter language code as defined by  ISO-639 .
  country An uppercase two-letter country code as defined by  ISO-3166 .

Sample Response

{
    "errors": {},
    "results": {
        "country=urn%3Ali%3Acountry%3Aus&stateCode=CA": {
            "$URN": "urn:li:state:(urn:li:country:us,CA)",
            "country": "urn:li:country:us",
            "name": {
                "locale": {
                    "country": "US",
                    "language": "en"
                },
                "value": "California"
            },
            "stateCode": "CA"
        },
        "country=urn%3Ali%3Acountry%3Aus&stateCode=NY": {
            "$URN": "urn:li:state:(urn:li:country:us,NY)",
            "country": "urn:li:country:us",
            "name": {
                "locale": {
                    "country": "US",
                    "language": "en"
                },
                "value": "New York"
            },
            "stateCode": "NY"
        }
    },
    "statuses": {}
}

GET ALL

GET https://api.linkedin.com/v2/states

Parameters

Field Name Sub-Field Name Description
locale   The locale the seniority data is requested in. "en_US" locale will be used if locale is not provided or not supported.
  language A lowercase two-letter language code as defined by  ISO-639 .
  country An uppercase two-letter country code as defined by  ISO-3166 .

Sample Response

{
  "elements": [
    {
      "name": {
        "locale": {
          "country": "US",
          "language": "en"
        },
        "value": "California"
      },
      "country": "urn:li:country:us",
      "stateCode": "CA",
      "$URN": "urn:li:state:(urn:li:country:us,CA)"
    },
    {
      "name": {
        "locale": {
          "country": "US",
          "language": "en"
        },
        "value": "New York"
      },
      "country": "urn:li:country:us",
      "stateCode": "NY",
      "$URN": "urn:li:state:(urn:li:country:us,NY)"
    },
    ...
  ],
  "paging": {
    "count": 10,
    "start": 0,
    "links": []
  }
}

FINDER country

Find all states in a country:

GET https://api.linkedin.com/v2/states?q=country&country={countryURN}

Parameters

Field Name Sub-Field Name Description
locale   The locale the seniority data is requested in. "en_US" locale will be used if locale is not provided or not supported.
  language A lowercase two-letter language code as defined by  ISO-639 .
  country An uppercase two-letter country code as defined by  ISO-3166 .

Sample Response

{
  "elements": [
    {
      "name": {
        "locale": {
          "country": "US",
          "language": "en"
        },
        "value": "California"
      },
      "country": "urn:li:country:us",
      "stateCode": "CA",
      "$URN": "urn:li:state:(urn:li:country:us,CA)"
    },
    {
      "name": {
        "locale": {
          "country": "US",
          "language": "en"
        },
        "value": "New York"
      },
      "country": "urn:li:country:us",
      "stateCode": "NY",
      "$URN": "urn:li:state:(urn:li:country:us,NY)"
    },
    ...
  ],
  "paging": {
    "count": 10,
    "start": 0,
    "links": []
  }
}