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

# List or look up locations

> Returns location-tree entries from the shared `goi_locations` table.

Modes:
- Root: `parent_id` omitted, empty, or `null` → returns continents and countries
- Children: `parent_id=<id>` → direct children of that location
- Exact: `name=<name>&location_type=<type>` → exact lookup

Locations are global navigation metadata — open to any caller past auth, no `regionAccess` filtering applied.



## OpenAPI

````yaml /api-reference/openapi.json get /locations
openapi: 3.1.0
info:
  title: GOI API
  description: >-
    Programmatic access to the ISTARI Global Organization Index (GOI) — search,
    bulk lookup, aggregations, and location resolution over ~20M verified
    organizations. Authenticate with the `x-api-key` header.
  version: v2
servers:
  - url: https://api.istari.ai/v2
    description: GOI API (production)
security:
  - ApiKeyAuth: []
paths:
  /locations:
    get:
      tags:
        - locations
      summary: List or look up locations
      description: >-
        Returns location-tree entries from the shared `goi_locations` table.


        Modes:

        - Root: `parent_id` omitted, empty, or `null` → returns continents and
        countries

        - Children: `parent_id=<id>` → direct children of that location

        - Exact: `name=<name>&location_type=<type>` → exact lookup


        Locations are global navigation metadata — open to any caller past auth,
        no `regionAccess` filtering applied.
      operationId: locations_v1_locations_get
      parameters:
        - name: parent_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Parent Id
        - name: name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Name
        - name: location_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Location Type
        - name: limit
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Limit
      responses:
        '200':
          description: Location items plus count.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocationsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    LocationsResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/LocationItem'
          type: array
          title: Items
        count:
          type: integer
          title: Count
      type: object
      required:
        - items
        - count
      title: LocationsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LocationItem:
      properties:
        location_id:
          type: string
          title: Location Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        location_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Location Type
        parent_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Id
        path:
          anyOf:
            - type: string
            - type: 'null'
          title: Path
        doc_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Doc Count
      type: object
      required:
        - location_id
      title: LocationItem
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Your GOI API key. Create one on the GOI dashboard under API keys.

````