OsmSharp.IO.API 1.1.0

dotnet add package OsmSharp.IO.API --version 1.1.0
                    
NuGet\Install-Package OsmSharp.IO.API -Version 1.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OsmSharp.IO.API" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OsmSharp.IO.API" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="OsmSharp.IO.API" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OsmSharp.IO.API --version 1.1.0
                    
#r "nuget: OsmSharp.IO.API, 1.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OsmSharp.IO.API@1.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OsmSharp.IO.API&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=OsmSharp.IO.API&version=1.1.0
                    
Install as a Cake Tool

OsmSharp.IO.API

NuGet Downloads

This is a simple C# client to allow using OSM API easily over REST. Please read the API's documentation and use it responsibly. Misuse can have an adverse affect on the OSM ecosystem. Pull requests are welcome. You will need VisualStudio, VS Code or Rider to modify this project.

Features

  • Supports Logging using ILogger
  • Supports Authentication with OAuth 2
  • Supports every documented operation of the Osm Api v0.6 (as of September 2026)
  • Is thread safe

Example Usage

// Create a client factory (pointing at the dev server)
var clientFactory = new ClientsFactory(null, new HttpClient(),
	"https://master.apis.dev.openstreetmap.org/api/");
// After testing, use "https://www.openstreetmap.org/api/" for production

Get a Node

var client = clientFactory.CreateNonAuthClient();
var node = await client.GetNode(100);

Delete a Node (map changes require OAuth)

var authClient = clientFactory.CreateOAuth2Client("oAuth-token");
var changeSetTags = new TagsCollection() { new Tag("comment", "Deleting a node.") };
var changeSetId = await client.CreateChangeset(changeSetTags);
node.Version = await client.DeleteElement(changeSetId, node);
await client.CloseChangeset(changeSetId);

See the functional tests for examples of each operation.

Supported Operations

🌕 = Does not use authentication

🌗 = With or without authentication (behavior may differ)

🌑 = Requires authentication

General Api Stuff

  • 🌕 Get Api versions
  • 🌕 Get Api capabilities
  • 🌕 Get a map section

Change Sets

  • 🌕 Get a specific changeset's metadata
  • 🌕 Get a specific changeset's changes
  • 🌕 Search for changesets
  • 🌑 Create a new changeset with metadata
  • 🌑 Add changes to an open changeset
  • 🌑 Update an open changeset's metadata
  • 🌑 Close an open changeset
  • 🌑 Add comments to a changeset
  • 🌑 Subscribe to a changeset
  • 🌑 UnSubscribe to a changeset
  • 🌕 Search changeset comments

Map Elements

  • 🌕 Get an element
  • 🌕 Get an element's version history
  • 🌕 Get a specific version of an element
  • 🌕 Search for elements
  • 🌕 Get relations containing a specific element
  • 🌕 Get ways containing a specific node
  • 🌕 Get a relation and all of its elements
  • 🌕 Get a way and all of its nodes
  • 🌑 Create a new element
  • 🌑 Update an element
  • 🌑 Delete an element

Gpx Files

  • 🌕 Get trackpoints in an area
  • 🌗 Get a gpx file's metadata
  • 🌗 Get a gpx file's original upload data
  • 🌑 Get current user's gpx files
  • 🌑 Create a new gpx file
  • 🌑 Update a gpx file's metadata
  • 🌑 Delete a gpx file

User Info

  • 🌕 Get details about a user
  • 🌕 Get details about many users
  • 🌑 Get current user's permissions
  • 🌑 Get current user's details
  • 🌑 Get current user's preferences
  • 🌑 Update current user's preferences
  • 🌑 Get a current user's preference
  • 🌑 Update a current user's preference
  • 🌑 Delete a current user's preference

Notes

  • 🌕 Search for notes
  • 🌕 Get an RSS feed of notes in an area
  • 🌕 Get a note
  • 🌗 Create a new note
  • 🌑 Comment on a note
  • 🌑 Close a note
  • 🌑 ReOpen a note
  • 🌑 Subscribe to a note
  • 🌑 UnSubscribe to a note

User Blocks

  • 🌕 Get a user block
  • 🌑 Get current user's active blocks

Contribute

Issues and pull requests are welcome.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 264 9/28/2026
1.0.5 3,211 6/11/2025
1.0.4 8,106 12/30/2022
1.0.3 877 12/30/2022
1.0.2 877 12/30/2022
1.0.1 882 12/30/2022
0.0.9 859 12/30/2022