---
title: useDeeplink
description: >-
  Retrieves the deeplink URL that launched the Mini, enabling external links to
  open specific screens with context.
source_url:
  html: 'https://shopify.dev/docs/api/shop-minis/hooks/navigation/usedeeplink'
  md: 'https://shopify.dev/docs/api/shop-minis/hooks/navigation/usedeeplink.md'
---

# useDeeplink

Retrieves the deeplink URL that launched the Mini, enabling external links to open specific screens with context. Use on mount to route to the correct initial screen based on the returned `path`, `queryParams` or `hash`. Common use: email/notification links opening to specific nested screens.

## use​Deeplink()

### Returns

* **UseDeeplinkReturnType**

### UseDeeplinkReturnType

* hash

  The hash of the deeplink.

  ```ts
  string
  ```

* path

  The path of the deeplink.

  ```ts
  string
  ```

* queryParams

  The query parameters of the deeplink.

  ```ts
  { [key: string]: string; }
  ```

Examples

### Examples

* ####

  ##### tsx

  ```tsx
  import {useDeeplink} from '@shopify/shop-minis-react'

  export default function MyComponent() {
    const {path, queryParams, hash} = useDeeplink()

    console.log({path, queryParams, hash})
  }
  ```

***
