> For the complete documentation index, see [llms.txt](https://docs.mapsindoors.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mapsindoors.com/sdks-and-frameworks/web/other-guides/synchronizing-data-for-a-subset-of-venues.md).

# Synchronizing data for a subset of venues

**This article assumes that you have already read the** [**Getting Started guide.**](/sdks-and-frameworks/web/tutorial/getting-started.md)

In this article, we will discuss how to synchronize data for a subset of venues in MapsIndoors. There are multiple benefits to doing this, including performance and control over which data the user can search for.

Synchronizing data for a subset of venues reduces the time it takes to load the map, compared to synchronizing data for all venues. It also enables you to control which data the user can search for. For example, you may only want to synchronize data for venues located in a specific region.

To do this, you must not provide the MapsIndoors API key in the URL when loading the SDK. Instead, you set the MapsIndoors API key by calling the `mapsindoors.MapsIndoors.setMapsIndoorsApiKey('MAPSINDOORS_API_KEY');` method before creating the MapsIndoors instance.

Here is an example of how to set which venues to synchronize data for, and then setting the MapsIndoors API key, to start the synchronization:

```javascript
// Add one or more venues to the list of venues to be synchronized.
mapsindoors.MapsIndoors.addVenuesToSync('FirstVenueId');
// Or
mapsindoors.MapsIndoors.addVenuesToSync(['FirstVenueId', 'SecondVenueId']);

// Set the MapsIndoors API key.
mapsindoors.MapsIndoors.setMapsIndoorsApiKey('MAPSINDOORS_API_KEY');
```

This will now synchronize data exclusively for these two venues, and only those venues.

You can also add one or more venues after the initial data synchronization:

```javascript
// Add one or more venues to the list of venues to be synchronized.
mapsindoors.MapsIndoors.addVenuesToSync('ThirdVenueId');
// Or
mapsindoors.MapsIndoors.addVenuesToSync(['ThirdVenueId', 'FourthVenueId']);
```

To remove the synchronized data for one or more venues:

```javascript
// Remove one or more venues from the list of venues to be synchronized.
mapsindoors.MapsIndoors.removeVenuesToSync('FirstVenueId');
// Or
mapsindoors.MapsIndoors.removeVenuesToSync(['FirstVenueId', 'ThridVenueId']);
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.mapsindoors.com/sdks-and-frameworks/web/other-guides/synchronizing-data-for-a-subset-of-venues.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
