--- title: Location - Storefront API description: Represents a location where product inventory is held. api_version: 2025-10 api_name: storefront type: object api_type: graphql source_url: html: https://shopify.dev/docs/api/storefront/latest/objects/location md: https://shopify.dev/docs/api/storefront/latest/objects/location.md --- # Location object Requires `unauthenticated_read_product_pickup_locations` access scope. Represents a location where product inventory is held. ## Fields * address [Location​Address!](https://shopify.dev/docs/api/storefront/latest/objects/LocationAddress) non-null The address of the location. * id [ID!](https://shopify.dev/docs/api/storefront/latest/scalars/ID) non-null A globally-unique ID. * metafield [Metafield](https://shopify.dev/docs/api/storefront/latest/objects/Metafield) Token access required A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information. * namespace [String](https://shopify.dev/docs/api/storefront/latest/scalars/String) ### Arguments The container the metafield belongs to. If omitted, the app-reserved namespace will be used. * key [String!](https://shopify.dev/docs/api/storefront/latest/scalars/String) required The identifier for the metafield. *** * metafields [\[Metafield\]!](https://shopify.dev/docs/api/storefront/latest/objects/Metafield) non-null Token access required A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) that a merchant associates with a Shopify resource. * identifiers [\[Has​Metafields​Identifier!\]!](https://shopify.dev/docs/api/storefront/latest/input-objects/HasMetafieldsIdentifier) required ### Arguments The list of metafields to retrieve by namespace and key. The input must not contain more than `250` values. *** * name [String!](https://shopify.dev/docs/api/storefront/latest/scalars/String) non-null The name of the location. *** ## Map ### Fields and connections with this object * <->[LocationConnection.nodes](https://shopify.dev/docs/api/storefront/latest/connections/LocationConnection#returns-nodes) * {}[LocationEdge.node](https://shopify.dev/docs/api/storefront/latest/objects/LocationEdge#field-LocationEdge.fields.node) * {}[StoreAvailability.location](https://shopify.dev/docs/api/storefront/latest/objects/StoreAvailability#field-StoreAvailability.fields.location) ### Possible type in * [Metafield​Parent​Resource](https://shopify.dev/docs/api/storefront/latest/unions/MetafieldParentResource) *** ## Queries * [locations](https://shopify.dev/docs/api/storefront/latest/queries/locations) query List of the shop's locations that support in-store pickup. When sorting by distance, you must specify a location via the `near` argument. * first [Int](https://shopify.dev/docs/api/storefront/latest/scalars/Int) ### Arguments Returns up to the first `n` elements from the list. * after [String](https://shopify.dev/docs/api/storefront/latest/scalars/String) Returns the elements that come after the specified cursor. * last [Int](https://shopify.dev/docs/api/storefront/latest/scalars/Int) Returns up to the last `n` elements from the list. * before [String](https://shopify.dev/docs/api/storefront/latest/scalars/String) Returns the elements that come before the specified cursor. * reverse [Boolean](https://shopify.dev/docs/api/storefront/latest/scalars/Boolean) Default:false Reverse the order of the underlying list. * sort​Key [Location​Sort​Keys](https://shopify.dev/docs/api/storefront/latest/enums/LocationSortKeys) Default:ID Sort the underlying list by the given key. * near [Geo​Coordinate​Input](https://shopify.dev/docs/api/storefront/latest/input-objects/GeoCoordinateInput) Used to sort results based on proximity to the provided location. *** *** ## \Location Queries ### Queried by * \[locations](https://shopify.dev/docs/api/storefront/latest/queries/locations) *** ## Interfaces * * [Has​Metafields](https://shopify.dev/docs/api/storefront/latest/interfaces/HasMetafields) interface * [Node](https://shopify.dev/docs/api/storefront/latest/interfaces/Node) interface *** ## ||-Location Implements ### Implements * ||-[Has​Metafields](https://shopify.dev/docs/api/storefront/latest/interfaces/HasMetafields) * ||-[Node](https://shopify.dev/docs/api/storefront/latest/interfaces/Node)