Maps Datasets API client libraries Stay organized with collections Save and categorize content based on your preferences.
AI-generated Key Takeaways
This page provides instructions on getting started with the Maps Datasets API client libraries for Node.js and Python.
You'll learn how to install the necessary client libraries using npm or pip.
Authentication is handled using Application Default Credentials (ADC), and the page links to resources for setting up ADC.
Code samples demonstrate basic usage of the client libraries, such as creating a dataset, for both Node.js and Python.
Links to additional resources like source code, issue trackers, and Stack Overflow are provided for further assistance.
This page shows how to get started with the client libraries forMaps Datasets API.
Read more about the client libraries inClient LibrariesExplained.
Install the client library
Node.js
For more information, seeSetting Up a Node.js Development Environment.
npm install @googlemaps/maps-platform-datasets
Python
For more information, seeSetting Up a Python Development Environment.
pip install --upgrade google-maps-mapsplatformdatasets
Set up authentication
When you use client libraries, you useApplication Default Credentials (ADC) to authenticate. For information about setting up ADC, seeProvide credentials for Application Default Credentials.For information about using ADC with client libraries, seeAuthenticate using client libraries.
Use the client library
Node.js
/** * This snippet has been automatically generated and should be regarded as a code template only. * It will require modifications to work. * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. *//** * Required. Parent project that will own the dataset. * Format: projects/{project} */// const parent = 'abc123'/** * Required. The dataset version to create. */// const dataset = {}// Imports the Mapsplatformdatasets libraryconst{MapsPlatformDatasetsClient}=require('@googlemaps/maps-platform-datasets').v1;// Instantiates a clientconstmapsplatformdatasetsClient=newMapsPlatformDatasetsClient();asyncfunctioncallCreateDataset(){// Construct requestconstrequest={parent,dataset,};// Run requestconstresponse=awaitmapsplatformdatasetsClient.createDataset(request);console.log(response);}callCreateDataset();Python
# This snippet has been automatically generated and should be regarded as a# code template only.# It will require modifications to work:# - It may require correct/in-range values for request initialization.# - It may require specifying regional endpoints when creating the service# client as shown in:# https://googleapis.dev/python/google-api-core/latest/client_options.htmlfromgoogle.mapsimportmapsplatformdatasets_v1defsample_create_dataset():# Create a clientclient=mapsplatformdatasets_v1.MapsPlatformDatasetsClient()# Initialize request argument(s)request=mapsplatformdatasets_v1.CreateDatasetRequest(parent="parent_value",)# Make the requestresponse=client.create_dataset(request=request)# Handle the responseprint(response)Additional resources
Node.js
Python
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-11-21 UTC.