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

{
    "featureId": "cky8ybaew00013g67ywqyfboe",
    "schemaId": "cky8xqathotfg10axdntqcja1",
    "title": "Sample object 1",
    "value": "sample_object_1",
    "color": "#70d4e0",
    "bbox": {
        "top":107.442,
        "left":102.326,
        "height":181.116,
        "width":274.232
    }
    "page":1,
    "unit":"POINTS", // points represent 1/72 of an inch.

Text entity (named entity)

objects": [
        {
          "featureId": "cl899p4jn0amu3b6ucjoamoyi",
          "schemaId": "cl899obmq004qt2mfay3673pu",
          "color": "#1CE6FF",
          "title": "Text",
          "value": "text",
          "data": {
            "customLayerMetadata": {
              "text": "evaluated by difference",
              "textLayerUrl": "https://storage.googleapis.com/labelbox-developer-testing-assets/pdf/pdf-custom-text-layer/E2G5F105-lb-custom-text-layer.json",
              "textSelections": [
                {
                  "groupId": "9cec3650-ed4f-4261-adf0-283a5f4ea736",
                  "page": 0,
                  "text": "evaluated by difference",
                  "tokenIds": [
                    "16e7328e-bc52-41a6-9530-6700d6d6809a",
                    "0c01d928-0c89-4208-92e6-e306c5d85756",
                    "71c89c58-f60a-4f0e-8696-87e6e350bade",
                    "554b16cc-ee6d-4e2a-b830-59829e0c892f",
                    "908b5d7f-71d7-464d-8a93-b1c7164c657c",
                    "107e8b38-5ae7-4d8e-b75f-7d7213282e8b",
                    "a68db17f-81d3-48f6-b6c8-acba25871445",
                    "ad98bf61-4b77-405e-9014-ced4e0fd346d",
                    "7382f859-ed2d-4cc7-b17e-ffac0a4ac05f",
                    "92e1fe01-1970-42bb-8ed5-4e48e2395ca0",
                    "42503f3a-4107-4a4a-b522-cfd88de0963f",
                    "fe71c1b6-9402-4737-b0cb-3c8853d1364b",
                    "84ead276-f302-4039-900b-7ca81fc0c5c4",
                    "da009cd4-47e4-417f-94d1-b51e816dc72d",
                    "825316bd-6443-4dff-9002-3fdf92d6a8e6",
                    "fa81eab7-9f06-48c6-b6db-4a432d633b37",
                    "be7b0345-0d96-47b1-bb43-a7fa1365c31d"
                  ]
                }
              ]
            }
          }
        }
      ]

Relationship

"relationships":[
   {
      "featureId":"cl3uaz2kn000p3f6crzl3qqww",
      "schemaId":"cl3n8b4oz51sc087jdrgl17q2",
      "data":
             {
            "source":"cl3uay4qj000i3f6c9jtvu2ab",
            "target":"cl3uaxxo2000f3f6cbselj2z3"
         },
      "relationshipType":"unidirectional",
      "version":1
   }
]

Classification - Radio

// Global classification
{
    "uuid": "1278daa6-ce64-4363-be24-4fa5eadffb17",
    "dataRow": {
        "id": "ckd11jg6scq9c0cq43vmh6i07"
    },  
    "schemaId": "ckd11j3yk000c0z0u4xn6dc4r", // Radio question
    "answer": {
        "schemaId": "ckd11j415000u0z0ubu7ee4w2" // Radio answer
    }
}

// Nested classification
{
    "uuid": "532953e6-746f-4d74-945d-b4a9c2786479",
    "schemaId": "ckshluz7h7d9b0yb60biaasya",
    "dataRow": {
        "id": "ckshkj1vj4rsq0yvubkoe76vi"
    },
    "bbox": {
        "top": 57,
        "left": 209,
        "height": 216,
        "width": 152
    },
    "classifications": [
        {
            "schemaId": "ckshluz847d9d0yb65oqhfg65", // Nested radio question
            "answer": {
                "schemaId": "ckshluz8r7d9j0yb6d9l45o1b" // Nested radio answer
            }
        }
    ]
}

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": "ckmuzkkhw000a3g68xegct9wz",
    "schemaId": "ckmuzjtfa64bq0y839bn8ci4l",
    "title": "Free-form text",
    "value": "free-form_text",
    "answer": "Correct text answer"
}

Sample Label payload - Document

[
    {
        "ID": "cky8xqftnocd50zbvh8h67z4x",
        "DataRow ID": "cky8wroom000v0zsqddjg2ges",
        "Labeled Data": "https://storage.labelbox.com/cjhfn5y6s0pk507024nz1ocys%2F5e697840-a142-d5c4-39cc-10a2efa070c8.pdf",
        "Label": {
            "objects": [
                {
                    "featureId": "cky8ybaew00013g67ywqyfboe",
                    "schemaId": "cky8xqathotfg10axdntqcja1",
                    "title": "Sample object 1",
                    "value": "sample_object_1",
                    "color": "#70d4e0",
                    "bbox":{
                        "top":107.442,
                        "left":102.326,
                        "height":181.116,
                        "width":274.232
                     },
                     "page":1,
                     "unit":"POINTS", // points represent 1/72 of an inch.
                    "instanceURI": "https://api.labelbox.com/masks/feature/cky8ybaew00013g67ywqyfboe"
                },
                {
                    "featureId": "ckn94pfs700033g68hidmdqsg",
                    "schemaId": "ckn94hhay0opv0y69fbpg76bs",
                    "title": "Sample object 2",
                    "value": "sample_object_2",
                    "color": "#FF34FF",
                    "instanceURI": "https://api.labelbox.com/masks/feature/ckn94pfs700033g68hidmdqsg?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJjazUycnZ4MWtxYXpiMDc3MDBtcTI3eDRsIiwib3JnYW5pemF0aW9uSWQiOiJjazUycnZ4MG1wdzRnMDc2NndncXZqdGw5IiwiaWF0IjoxNjE3OTAzMDU5LCJleHAiOjE2MjA0OTUwNTl9.r6Qw2Qx_wbtflEwnZm-7XzPP-AbZn5VuIQ4_ETjBqJc"
                }
            ],
            "classifications": [
                {
                    "featureId": "cky8ybfqf00043g670ies4irl",
                    "schemaId": "cky8xqathotfh10axbjzofimy",
                    "title": "Role:",
                    "value": "role",
                    "answers": {
                        "featureId": "cky8ybfqf00033g67f1vrj24v",
                        "schemaId": "cky8xqathotfi10ax06z82rup",
                        "title": "Author",
                        "value": "author"
                    }
                }
            ]
        },
        "Created By": "[email protected]",
        "Project Name": "Document Labeling",
        "Created At": "2022-01-10T17:22:46.000Z",
        "Updated At": "2022-01-10T17:22:46.602Z",
        "Seconds to Label": 0,
        "External ID": "Navigating the New Landscape of AI Platforms.pdf",
        "Agreement": -1,
        "Benchmark Agreement": -1,
        "Benchmark ID": null,
        "Dataset Name": "Document Samples",
        "Reviews": [],
        "View Label": "https://editor.labelbox.com?project=cky8xlauaow3710bx1s2bev2l&label=cky8xqftnocd50zbvh8h67z4x",
        "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"
              }
            ]
        }
    }
]