---
title: "Get Osm Current Snapshot As File"
method: POST
path: "/snapshot/"
---

# Get Osm Current Snapshot As File

`POST /snapshot/`

Generates the current raw OpenStreetMap data available on database based on the input geometry, query and spatial features.

Steps to Run Snapshot :

1.  Post the your request here and your request will be on queue, endpoint will return as following :
    {
        "task_id": "your task_id",
        "track_link": "/tasks/task_id/"
    }
2. Now navigate to /tasks/ with your task id to track progress and result

## Request body

- RawDataCurrentParams
  - `outputType` 'geojson' | 'kml' | 'shp' | 'fgb' | 'mbtiles' | 'gpkg' | 'sql' | 'csv' — An enumeration.
  - `minZoom` integer — Only for mbtiles
  - `maxZoom` integer — Only for mbtiles
  - `fileName` string
  - `geometryType` SupportedGeometryFilters[]
  - `joinFilterType` 'OR' | 'AND' — An enumeration.
  - `countryExport` boolean — Intersects the passed geom to country boundary if set to true and exports whole country : Use with Caution , May take hours
  - `filters` Filters
    - `tags` TagsFilter
      - `point` object
      - `line` object
      - `polygon` object
      - `allGeometry` object
    - `attributes` AttributeFilter
      - `point` string[]
      - `line` string[]
      - `polygon` string[]
      - `allGeometry` string[]
  - `geometry` union
    - Polygon — Polygon Model
      - `coordinates` array[], required
        - union[]
          - union
            - unknown[]
              - …
            - unknown[]
              - …
      - `type` string
    - MultiPolygon — MultiPolygon Model
      - `coordinates` array[], required
        - array[]
          - union[]
            - union
              - …
      - `type` string

## Response `200`

Successful Response

- SnapshotResponse
  - `taskId` string, required
  - `trackLink` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/hotosm/apis/raw-data-api.md) · [All operations](https://skmtc.dev/hotosm/apis/raw-data-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hotosm/raw-data-api/revisions/4d2c3132d38a/schema)
