# Google Maps JavaScript URL Signing
[](https://www.npmjs.com/package/@googlemaps/url-signature)


[](https://codecov.io/gh/googlemaps/js-url-signature)

[](https://github.com/semantic-release/semantic-release)
[](https://github.com/apps/in-solidarity)
## Description
Sign a URL for Google Maps Platform requests.
> **Warning**: It is not recommended to use this library in client side applications to avoid exposing the secret used to sign the URL.
## Install
Available via npm as the package [@googlemaps/url-signature](https://www.npmjs.com/package/@googlemaps/url-signature).
`npm i @googlemaps/url-signature`
## Documentation
Check out the [reference documentation](https://googlemaps.github.io/js-url-signature/index.html).
## Example
Create a signature for a Google Maps request [URL](https://developer.mozilla.org/en-US/docs/Web/API/URL) or url string.
```ts
const signature = createSignature("https://example.com/some-path?foo=bar", "secret");
```
Returns a new [URL](https://developer.mozilla.org/en-US/docs/Web/API/URL) having a signature parameter.
```ts
const signedUrl = signUrl("https://example.com/some-path?foo=bar", "secret");
signedUrl.href; // "https://example.com/some-path?foo=bar&signature=..."
```
Create a signature for a path and query string using Hmac SHA1.
```ts
const signature = createSignatureForPathAndQuery("/some-path?foo=bar", "secret");
```
> **Note**: This is not an officially supported Google product
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/GongRzhe/TRAVEL-PLANNER-MCP-Server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server