---
title: "RoutingOptions | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> 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.

# Interface RoutingOptions

Options applying to the routing request itself, rather than to the route.

interface RoutingOptions {  
    [adjustSearchParams](#adjustsearchparams)?: (searchParams: URLSearchParams) \=> void;  
    [apiKey](#apikey)?: string;  
    [fetchExtras](#fetchextras)?: RequestInit;  
}

##### Index

### Properties

[adjustSearchParams?](#adjustsearchparams) [apiKey?](#apikey) [fetchExtras?](#fetchextras)

## Properties

### `Optional`adjustSearchParams[](#adjustsearchparams)

adjustSearchParams?: (searchParams: URLSearchParams) \=> void

Callback function to adjust the target URL search params before fetching.

#### Type Declaration

-   -   (searchParams: URLSearchParams): void
    -   #### Parameters
        
        -   searchParams: URLSearchParams
            
            [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) object that can be modified in place.
            
        
        #### Returns void
        

### `Optional`apiKey[](#apikey)

apiKey?: string

Custom MapTiler Cloud API key to use instead of the one in global `config`.

### `Optional`fetchExtras[](#fetchextras)

fetchExtras?: RequestInit

Extra options to pass to the underlying [fetch](https://developer.mozilla.org/en-US/docs/Web/API/RequestInit) call.
