Export JSON annotations

labels = project.export_labels(download=True)

# Optionally, provide a date range as an optional parameter
# This will export only labels created between the supplied dates
# Date range can be formatted as "YYYY-MM-DD" or "YYYY-MM-DD hh:mm:ss"
labels = project.export_labels(download=True, start="2022-09-28", end="2022-10-04")

Annotation export formats

Bounding box

The bounding box coordinates are returned in the following order:

  • bottom left
  • top left
  • top right
  • bottom right
  • bottom left

All coordinates are provided in [long, lat]

{
      "featureId":"clb5fn13z00013b6i8qny4g3w",
      "schemaId":"cl23pid313ngm0z8ydzd5g3md",
      "color":"#1CE6FF",
      "title":"Geo box",
      "value":"geo_box",
      "type":"rectangle",
      "geometry":{
        "coordinates":[
          [
            [
              -58.64355672718979,
              -34.47613968717428
            ],
            [
              -58.64355672718979,
              -34.44613181682816
            ],
            [
              -58.58743082163835,
              -34.44613181682816
            ],
            [
              -58.58743082163835,
              -34.47613968717428
            ],
            [
              -58.64355672718979,
              -34.47613968717428
            ]
          ]
        ]
      }
    }
}
{
    "featureId":"clb6tvma800013b6ix310lnru",
    "schemaId":"cl23pid313ngm0z8ydzd5g3md",
    "color":"#1CE6FF",
    "title":"Geo box",
    "value":"geo_box",
    "bbox":{
      "top":13632.129661999184,
      "left":13849.810566685177,
      "height":7552.047313848951,
      "width":11358.509562496845
    }
}

Point

All coordinates are provided in [long, lat]

{
    "featureId": "cknjemyt800073g68xh4fsxeu",
    "schemaId": "cknjemcpt0l4n0y92d3oo7no3",
    "title": "test3",
    "value": "test3",
    "color": "#FF4A46",
    "type": "point",
    "geometry": {
        "coordinates": [
            -99.20951155086122,
            19.404749976992253
        ]
    }
}
 {
     "featureId":"clb6txi0j00023b6iqif07ppk",
     "schemaId":"cl23pid313ngq0z8ygoi9ga0t",
     "color":"#FF4A46",
     "title":"Geo point",
     "value":"geo_point",
     "point":{
       "x":21254.921700502862,
       "y":22656.042239137925
     }
 }

Polyline

All coordinates are provided in [long, lat]

{
    "featureId": "ckossvrll00033h68tczgb8p9",
    "schemaId": "ckosstz24fhci0yag63j377hz",
    "title": "line",
    "value": "line",
    "color": "#FF34FF",
    "type": "polyline",
    "geometry": {
        "coordinates": [
            [
                151.20330452874953,
                -33.866105019363175
            ],
            [
                151.20364785147953,
                -33.866737933344254
            ]
        ]
    }
}
{
    "featureId":"clb6u6jse00023b6ifozrjxnx",
    "schemaId":"cl23pid313ngo0z8y5lx73wdw",
    "color":"#FF34FF",
    "title":"Geo line",
    "value":"geo_line",
    "line":[
      {
        "x":20600.44291935464,
        "y":27200.431337906834
      },
      {
        "x":26167.539711258913,
        "y":40640.51554051937
      },
      {
        "x":28215.20749678692,
        "y":30656.45299000721
      },
      {
        "x":29367.02062614642,
        "y":35008.480255615075
      },
      {
        "x":30646.812992101426,
        "y":28800.441362027377
      }
    ]
}

Polygon

All coordinates are provided in [long, lat]

The order of the coordinates is based on the sequence of points when drawn.

{
    "featureId": "cknjekt1u00033g68rhvautuz",
    "schemaId": "cknjek2a80jic0y94dn8xgh5a",
    "title": "test2",
    "value": "test2",
    "color": "#FF34FF",
    "type": "polygon",
    "geometry": {
        "coordinates": [
            [
                [
                    -99.2086085262586,
                    19.402699145687013
                ],
                [
                    -99.20676074827523,
                    19.40271185664698
                ],
                [
                    -99.2069136106043,
                    19.40341371560633
                ],
                [
                    -99.20818859228417,
                    19.403328482715512
                ],
                [
                    -99.2086085262586,
                    19.402699145687013
                ]
            ]
        ]
    }
}
{
    "featureId":"clb6u6euk00003b6i2870ia1u",
    "schemaId":"cl23pid323ngs0z8y3h1j85us",
    "color":"#008941",
    "title":"Geo polygon",
    "value":"geo_polygon",
    "polygon":[
      {
        "x":7226.612695124844,
        "y":23424.40768098236
      },
      {
        "x":2875.318650877831,
        "y":33024.4678257056
      },
      {
        "x":4027.131780237334,
        "y":39872.51072894152
      },
      {
        "x":19768.577881483885,
        "y":39360.50752122294
      },
      {
        "x":20536.453301056892,
        "y":35968.48627008739
      },
      {
        "x":15353.294218939125,
        "y":29312.444569745952
      }
    ]
}

Classification - Radio

{
    "featureId": "cknp3d0hw00013g68wkjemi6o",
    "schemaId": "cknp3ctst06nq0ycte8icc2l3",
    "title": "Is it daytime?",
    "value": "is_it_daytime?",
    "answer": {
        "featureId": "cknp3d0hw00003g685c0nj5c1",
        "schemaId": "cknp3cttx06oe0yct3f0d6pmz",
        "title": "Yes",
        "value": "yes"
    }
}

Classification - Checklist

{
  "featureId": "cl89b1d3g00013b6k8388lpol",
  "schemaId": "cl89b186w0xg107xkga0fdf4j",
  "scope": "global",
  "title": "Attributes",
  "value": "attributes",
  "answers": [
    {
      "featureId": "cl89b1dln00033b6ky6j9cb62",
      "schemaId": "cl89b186w0xg407xk4yvkf3o8",
      "title": "Crowded",
      "value": "crowded"
    },
    {
      "featureId": "cl89b1e3z00063b6kll28e559",
      "schemaId": "cl89b186w0xg607xk8ogy304a",
      "title": "Foot traffic",
      "value": "foot_traffic"
    },
    {
      "featureId": "cl89b1ekd000a3b6kbiipqxi7",
      "schemaId": "cl89b186w0xg807xke5kg606w",
      "title": "Vehicle traffic",
      "value": "vehicle_traffic"
    }
  ]
}

Classification - Free-form text

{
    "featureId": "cknp3dugp00073g68fkudn092",
    "schemaId": "cknp3ctsu06nu0yctf0v5gzij",
    "title": "Free-form text",
    "value": "free-form_text",
    "answer": "Correct text answer"
}

Sample Label payload

[   
    {
        "ID": "cknjenzdz000j3g68m4m0si3n",
        "DataRow ID": "cknje9wzy3zjo0ysiaxbqcpmn",
        "Labeled Data": "{\"tileLayerUrl\":\"https://s3-us-east-2.amazonaws.com/lb-ron/CACI/ron_mctiles/{z}/{x}/{y}.png\",\"bounds\":[[19.37468183118193,-99.21052827588443],[19.36951840079928,-99.20534818927473]],\"minZoom\":12,\"maxZoom\":20,\"epsg\":\"EPSG4326\",\"alternativeLayers\":[{\"tileLayerUrl\":\"https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw\",\"name\":\"Satellite\"},{\"tileLayerUrl\":\"https://api.mapbox.com/styles/v1/mapbox/navigation-guidance-night-v4/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw\",\"name\":\"Guidance\"}]}",
        "Label": {
            "objects": [
                {
                    "featureId": "cknjen3yk000b3g68nkz6ykfs",
                    "schemaId": "cknjek2a80jia0y943yo56ken",
                    "title": "test1",
                    "value": "test1",
                    "color": "#1CE6FF",
                    "type": "polygon",
                    "geometry": {
                        "coordinates": [
                            [
                                [
                                    -99.20909603539366,
                                    19.372026698005648
                                ],
                                [
                                    -99.20786968446487,
                                    19.37236831548407
                                ],
                                [
                                    -99.20868616690551,
                                    19.373114634814314
                                ],
                                [
                                    -99.20909603539366,
                                    19.372026698005648
                                ]
                            ]
                        ]
                    }
                },
                {
                    "featureId": "cknjenq3c000c3g68lpyqvwtk",
                    "schemaId": "cknjek2a80jic0y94dn8xgh5a",
                    "title": "test2",
                    "value": "test2",
                    "color": "#FF34FF",
                    "type": "polygon",
                    "geometry": {
                        "coordinates": [
                            [
                                [
                                    -99.20775055066333,
                                    19.37308760065266
                                ],
                                [
                                    -99.20764572089253,
                                    19.373016691720807
                                ],
                                [
                                    -99.20759511302744,
                                    19.37308946264962
                                ],
                                [
                                    -99.20766178156738,
                                    19.37316566511257
                                ],
                                [
                                    -99.20775055066333,
                                    19.37308760065266
                                ]
                            ]
                        ]
                    }
                },
                {
                    "featureId": "cknjenvly000e3g68u0b05595",
                    "schemaId": "cknjemcpt0l4n0y92d3oo7no3",
                    "title": "test3",
                    "value": "test3",
                    "color": "#FF4A46",
                    "type": "point",
                    "geometry": {
                        "coordinates": [
                            -99.20803986635566,
                            19.372954675921154
                        ]
                    }
                }
            ],
            "classifications": []
        },
        "Created By": "[email protected]",
        "Project Name": "Geospatial export test",
        "Created At": "2021-04-15T21:39:26.000Z",
        "Updated At": "2021-04-15T21:41:16.000Z",
        "Seconds to Label": 60.72,
        "External ID": "cklidjjbk0ngb0y5p3nbw2960",
        "Agreement": -1,
        "Benchmark Agreement": -1,
        "Benchmark ID": null,
        "Dataset Name": "geospatial.json",
        "Reviews": [],
        "View Label": "https://editor.labelbox.com?project=cknje90o908gu0807i5ukcwvr&label=cknjenzdz000j3g68m4m0si3n",
        "Has Open Issues": 0,
        "Skipped": false,
        "DataRow Workflow Info": {
            "taskName": "Done",
            "Workflow History": [
              {
                "actorId": "cl3lobugu14pw0796fau0dgad",
                "action": "APPROVE",
                "createdAt": "2022-09-29T15:46:23.269Z",
                "previousTaskId": "0ae49522-97f0-4a07-96c6-bd4d50963acd",
                "previousTaskName": "Initial review task"
              },
              {
                "actorId": "cl3lobugu14pw0796fau0dgad",
                "action": "REWORK",
                "createdAt": "2022-09-29T14:23:59.735Z",
                "previousTaskId": "4a0d7f40-0c3f-0cc8-adc4-fd818684facd",
                "previousTaskName": "Rework (all rejected)",
                "nextTaskId": "0ae49522-97f0-4a07-96c6-bd4d50963acd",
                "nextTaskName": "Initial review task"
              },
              {
                "actorId": "cl1qe5naj3g460z6e0owr6mwj",
                "action": "REJECT",
                "createdAt": "2022-09-29T13:39:01.077Z",
                "previousTaskId": "0ae49522-97f0-4a07-96c6-bd4d50963acd",
                "previousTaskName": "Initial review task",
                "nextTaskId": "4a0d7f40-0c3f-0cc8-adc4-fd818684facd",
                "nextTaskName": "Rework (all rejected)"
              },
              {
                "actorId": "cl3ucfsj22j8l073xaitnh1xe",
                "action": "MOVE",
                "createdAt": "2022-09-28T18:06:16.881Z",
                "previousTaskId": "ea78e526-e429-002e-8b80-b72c4b591152",
                "previousTaskName": "Initial labeling task",
                "nextTaskId": "0ae49522-97f0-4a07-96c6-bd4d50963acd",
                "nextTaskName": "Initial review task"
              },
              {
                "actorId": "cl3ucfsj22j8l073xaitnh1xe",
                "action": "MOVE",
                "createdAt": "2022-09-28T18:06:16.859Z",
                "nextTaskId": "ea78e526-e429-002e-8b80-b72c4b591152",
                "nextTaskName": "Initial labeling task"
              }
            ]
        }
    }
]