> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# getGeoAssetPath()

- Package: [@gooddata/sdk-backend-spi](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/index.md)
- Kind: function
- Stability: alpha
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-backend-spi/src/geo/index.ts

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Returns the path and query of a geo asset URL, with its origin removed; `undefined` when the URL does not point at a geo asset.

**Signature:**

```typescript
export declare function getGeoAssetPath(url: string): string | undefined;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| url | string | absolute or relative URL; may still contain MapLibre template tokens such as `{z}` |

**Returns:**

string &#124; undefined

## Remarks

A style document can reference assets on third-party hosts, which must keep their URL and must never receive GoodData credentials. The check is anchored at the start of the path, so a third-party URL that only mentions [GEO\_ASSET\_PATH](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.geo_asset_path/index.md) further in (in a sub-path or a query) does not qualify. The returned path is what a backend implementation loads from its own host, so the origin found in the URL is never contacted with credentials.
