> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pipecorn.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Location Ids

> Get the location id of a specific location



## OpenAPI

````yaml POST /locations
openapi: 3.0.1
info:
  title: Pipecorn Miscellaneous API
  description: Pipecorn Miscellaneous API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://app.pipecorn.com/api/v2/
security:
  - defaultApiKey: []
paths:
  /locations:
    post:
      summary: Get the location id of a specific location
      description: >-
        Resolve location names to IDs used by search endpoints. The `source`
        parameter selects which catalog to resolve against:


        - `live` (default): LinkedIn Sales Navigator. Requires valid LinkedIn
        credentials on the account.

        - `database`: the internal geo database used by the company/lead
        database search endpoints. No LinkedIn credentials required.

        - `hiring`: the hiring-signal location catalog. No LinkedIn credentials
        required.


        The shape of each returned item depends on the `source` (see the
        response examples below).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  example: San Francisco
                  description: The name of the location to get the id of
                source:
                  type: string
                  enum:
                    - live
                    - database
                    - hiring
                  default: live
                  example: live
                  description: >-
                    Which location catalog to resolve against. `live` uses
                    LinkedIn Sales Navigator (requires LinkedIn credentials);
                    `database` uses the internal geo database; `hiring` uses the
                    hiring-signal catalog. Defaults to `live` when omitted.
              example:
                name: San Francisco
                source: live
      responses:
        '200':
          description: >-
            Locations retrieved successfully. Each item always includes `id` and
            `name`; additional fields depend on the `source`.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      description: >-
                        The ID of the location, to be passed to search
                        endpoints.
                    name:
                      type: string
                      description: >-
                        The name of the location. For `source: live` this is the
                        full display name.
                    display_name:
                      type: string
                      description: >-
                        Full human-readable location name. Returned for `source:
                        hiring` only.
                    country_code:
                      type: string
                      description: >-
                        ISO 3166-1 alpha-2 country code. Returned for `source:
                        hiring` only.
                    type:
                      type: string
                      description: >-
                        Geo-zone kind (e.g. country, region, city). Returned for
                        `source: database` only.
                    subtitle:
                      type: string
                      description: >-
                        Human-readable context such as parent regions and kind.
                        Returned for `source: database` only.
              examples:
                live:
                  summary: 'source: live (LinkedIn Sales Navigator)'
                  value:
                    - name: San Francisco Bay Area
                      id: '90000084'
                    - name: San Francisco, California, United States
                      id: '102277331'
                database:
                  summary: 'source: database (internal geo database)'
                  value:
                    - id: country:fr
                      name: France
                      type: country
                      subtitle: country
                hiring:
                  summary: 'source: hiring (hiring-signal catalog)'
                  value:
                    - id: '1'
                      display_name: Paris, France
                      name: Paris
                      country_code: FR
components:
  securitySchemes:
    defaultApiKey:
      type: apiKey
      in: header
      description: Your API key
      name: X-API-KEY

````