---
title: "Search Location Entities"
method: POST
path: "/data/searches/locations"
tags: ["Search"]
---

# Search Location Entities

`POST /data/searches/locations`

## Request

- Base URL: `https://api.crunchbase.com/v4`
- URL: `https://api.crunchbase.com/v4/data/searches/locations`
- Auth: API key in header `X-cb-user-key`

Can perform more complex filtering based on the query defined in the request body

## Request body

- LocationEntitySearch: EntitySearch for Location search
  - `after_id` string, uuid: Used to paginate search results to the next page. after_id should be the uuid of the last item in the current page. May not be provided simultaneously with before_id.
  - `before_id` string, uuid: Used to paginate search results to the previous page. before_id should be the uuid of the first item in the current page. May not be provided simultaneously with after_id.
  - `field_ids` string[], required: The list of field_ids to include in the result
  - `limit` integer: Number of rows to return. Default is 100, min is 1, max is 1000.
  - `order` Order[]: Order in which the search results should be returned
    - `field_id` string, required: Name of the field to sort on
    - `nulls` 'first' | 'last'
    - `sort` 'asc' | 'desc', required
  - `query` Predicate[], required: Search query to perform on the designated entity
    - `field_id` string, required: The field to operate on
    - `operator_id` 'blank' | 'eq' | 'not_eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'starts' | 'contains' | 'not_contains' | 'between' | 'includes' | 'not_includes' | 'includes_all' | 'not_includes_all' | 'domain_eq' | 'not_domain_eq' | 'domain_blank' | 'domain_includes' | 'not_domain_includes', required: Search operations for use in predicates * between - Between. Provide two values in "values" * blank - Is blank. Possible values in "values" is "true" or "false" * contains - Contains * domain_blank - Domain is blank. Possible values in "values" is "true" or "false" * domain_eq - Domain equals * domain_includes - Domain includes any * eq - Equals * gt - Greater than * gte - Greater than or equal to * includes - Includes any * includes_all - Includes all * lt - Less than * lte - Less than or equal to * not_contains - Does not contain * not_domain_eq - Domain not equal * not_domain_includes - Domain does not include * not_eq - Does not equal * not_includes - Does not include * not_includes_all - Does not include all * starts - Starts with
    - `type` 'predicate', required: The type of the query (Predicate)
    - `values` union[]: Values array with data type matching field_id type
      - union
        - string
        - number
        - boolean

## Response `200`

Results are identifiers matching the search query

- object: Search results include Location entities
  - `count` integer: Total number of Location entities
  - `entities` object[]: List of Location entities
    - `properties` Location
      - `country_code` string: Short alphabetic or numeric geographical codes that represent countries (e.g. TWN, USA, ZAF)
      - `country_code_ext` string
      - `created_at` string, date-time: Created At
      - `entity_def_id` 'location': * location - Location
      - `facet_ids` string[]: Type of location (e.g. City, Continent, Regional Area)
      - `groups` LocationIdentifier[]: Regional areas this location belongs to (e.g. San Francisco Bay Area, Silicon Valley)
        - `entity_def_id` string, required: What type of entity this be
        - `image_id` string: Optionally provided location to obtain an image representing this entity
        - `location_type` 'city' | 'region' | 'country' | 'continent' | 'group'
        - `permalink` string: Optionally provided within Entity Def unique nice id of this entity
        - `uuid` string, uuid, required: Globally unique id of this entity
        - `value` string: Textual representation of this entity (i.e. its "name")
      - `identifier` LocationIdentifier, required: Every location entity in the system has a unique identifier that contains all necessary properties to represent it.
        - `entity_def_id` string, required: What type of entity this be
        - `image_id` string: Optionally provided location to obtain an image representing this entity
        - `location_type` 'city' | 'region' | 'country' | 'continent' | 'group'
        - `permalink` string: Optionally provided within Entity Def unique nice id of this entity
        - `uuid` string, uuid, required: Globally unique id of this entity
        - `value` string: Textual representation of this entity (i.e. its "name")
      - `location_type` 'city' | 'region' | 'country' | 'continent' | 'group': Type of location (e.g. City, Continent, Regional Area) * city - City * continent - Continent * country - Country * group - Regional Area * region - Region
      - `locations` LocationIdentifier[]: Full location name (e.g. Denver, Colorado, United States, North America)
        - `entity_def_id` string, required: What type of entity this be
        - `image_id` string: Optionally provided location to obtain an image representing this entity
        - `location_type` 'city' | 'region' | 'country' | 'continent' | 'group'
        - `permalink` string: Optionally provided within Entity Def unique nice id of this entity
        - `uuid` string, uuid, required: Globally unique id of this entity
        - `value` string: Textual representation of this entity (i.e. its "name")
      - `name` string
      - `permalink` string
      - `permalink_aliases` string[]: These are the alternative aliases to the primary permalink of the Organization
      - `region_code` string: Region code used to define location
      - `short_description` string: Description
      - `updated_at` string, date-time: Updated At
      - `uuid` string, uuid
    - `uuid` string, uuid: UUID of the entity

## Other responses

- `400`: Bad Request
- `404`: Not Found
- `500`: Request Failed

---

[API](https://skmtc.dev/crunchbase/apis/predictions-only-package.md) - [All operations](https://skmtc.dev/crunchbase/apis/predictions-only-package/llms.txt) - [OpenAPI document](https://skmtc.dev/crunchbase/apis/predictions-only-package/revisions/b1be53f56190?raw)
