Udostępnij przez


Geo

Try in Postman

The Geo API returns the geo data for the given Geo ID. This API doesn’t share member personal data as part of the API response.

The service provides the following methods:

  • Get Geo data for a specific Geo ID
  • Batch Get all Geo data

Permissions

Permission Description
r_dma_admin_pages_content Retrieve your organization’s posts, comments, reactions, and other engagement data. Retrieve your organization’s pages and their reporting data (including follower, visitor and content analytics).

See Organization Access Control for more information on company page roles.

Member Data Obfuscation

This DMA API has no member data that is obfuscated.

Schema

Field Format Description Required
id int The Geo ID Yes
defaultLocalizedName LocaleString Localized name of the Geo data in different locales No

Retrieve Geo Data

GET

Sample Request

GET https://api.linkedin.com/rest/dmaGeo/{GEO_ID}?locale=(language:en,country:US)

Sample Response

{
    "defaultLocalizedName": {
        "locale": {
            "country": "US",
            "language": "en"
        },
        "value": "Shanghai, China"
    },
    "id": 102772228
}

Parameters

Field Name Sub Field Name Description Required Example
locale   The locale the country/region data is requested in. "en_US" locale will be used if locale is not provided or not supported. No (language:en,country:US)
  language A lowercase two-letter language code as defined by ISO-639. No language:en
  country An uppercase two-letter country code as defined by ISO-3166. No country:US

BATCH_GET

Sample Request

GET https://api.linkedin.com/rest/dmaGeo?ids={LIST_OF_GEO_IDS}&locale=(language:en,country:US)

Sample Response

{
    "results": {
        "102772226": {
            "defaultLocalizedName": {
                "locale": {
                    "country": "US",
                    "language": "en"
                },
                "value": "Dives, Hauts-de-France, France"
            },
            "id": 102772226
        },
        "102772228": {
            "defaultLocalizedName": {
                "locale": {
                    "country": "US",
                    "language": "en"
                },
                "value": "Shanghai, China"
            },
            "id": 102772228
        }
    },
    "statuses": {},
    "errors": {}
}

Parameters

Field Name Sub Field Name Description Required Example
locale   The locale the country/region data is requested in. "en_US" locale will be used if locale is not provided or not supported. No (language:en,country:US)
  language A lowercase two-letter language code as defined by ISO-639. No language:en
  country An uppercase two-letter country code as defined by ISO-3166. No country:US

API Error Details

HTTP Status Code ERROR MESSAGE DESCRIPTION ERROR RESOLUTION
401 EMPTY_ACCESS_TOKEN Empty or expired oauth2 access token Use a valid member access token
403 ACCESS_DENIED Not enough permissions to access: targetingAudienceInsights Make sure you developer application is provisioned with the (Private) Audience Insights API
403 USER_NOT_AUTHORIZED Caller should have access to the Ad Account provided in the request Make sure the member associated with access token has a user role on the provided Ad Account
422 FAILED_VALIDATION_CONDITION Request fails structure validation. / Missing required fields in the request Make sure all required fields are passed and follow valid structure
500 INTERNAL_SERVER_ERROR Internal server side error N/A