---
title: "fetchStyleUrl | Mobile sdk | Mobile sdk android | Android"
description: "fetchStyleUrl"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# fetchStyleUrl

fun [fetchStyleUrl](https://docs.maptiler.com/mobile-sdk/android/api/-map-tiler-s-d-k/com.maptiler.maptilersdk.map.style/-m-t-map-reference-style/fetch-style-url/)(variant: [MTMapStyleVariant](https://docs.maptiler.com/mobile-sdk/android/api/-map-tiler-s-d-k/com.maptiler.maptilersdk.map.style/-m-t-map-style-variant/)? = null, apiKey: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)): [URL](https://developer.android.com/reference/kotlin/java/net/URL.html)?

Resolves the concrete MapTiler Cloud style URL for this reference style and optional variant. Returns null if the custom URL is malformed.

#### Return

The resolved style URL.

#### Parameters

variant

The optional style variant.

apiKey

The MapTiler API key.
