Stay organized with collectionsSave and categorize content based on your preferences.
Thetypeandformatproperties on parameters and schemas can be used
to determine the data type of the property. Thetypeproperty indicates the type of
the property when its sent in JSON requests and responses (JSON supports a small set of data
types, seejson.orgfor details). Theformatproperty provides additional information about the underlying type. Properties will always have
atypeproperty, but some may also have aformatproperty.
For example, a 64-bit integer cannot be represented in JSON (since JavaScript and JSON support
integers up to 2^53). Therefore, a 64-bit integer must be represented as a string in JSON
requests/responses. So thetypeproperty will be set to "string", but theformatproperty will be set to "int64" to indicate that it is a 64-bit integer.
The JSON Schema spec alreadydefines a set of common
valuesfor theformatproperty. The Google APIs Discovery Service supports some
of these values, and defines others as well. The full list oftypeandformatvalues supported by Google APIs Discovery Service is summarized below.
string
uint64
A 64-bit unsigned integer. It has a minimum value of 0 and a maximum value of (2^64)-1
(inclusive).
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-16 UTC."],[[["\u003cp\u003eThe \u003ccode\u003etype\u003c/code\u003e property in parameters and schemas indicates the data type as represented in JSON requests and responses.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eformat\u003c/code\u003e property provides further detail about the underlying data type, complementing the \u003ccode\u003etype\u003c/code\u003e property.\u003c/p\u003e\n"],["\u003cp\u003eCertain data types, like 64-bit integers, are represented as strings in JSON, where \u003ccode\u003etype\u003c/code\u003e is "string" and \u003ccode\u003eformat\u003c/code\u003e is "int64".\u003c/p\u003e\n"],["\u003cp\u003eThe Google APIs Discovery Service supports several \u003ccode\u003eformat\u003c/code\u003e values, some defined by the JSON Schema specification and others specifically by Google.\u003c/p\u003e\n"],["\u003cp\u003eThe client libraries may use language-specific types, rather than the type and format values present in the JSON, such as representing a 64-bit integer with a type \u003ccode\u003elong\u003c/code\u003e in Java, instead of a string.\u003c/p\u003e\n"]]],[],null,["# Type and format\n\nThe `type` and `format` properties on parameters and schemas can be used\nto determine the data type of the property. The `type` property indicates the type of\nthe property when its sent in JSON requests and responses (JSON supports a small set of data\ntypes, see [json.org](https://json.org) for details). The `format`\nproperty provides additional information about the underlying type. Properties will always have\na `type` property, but some may also have a `format` property.\n\n\nFor example, a 64-bit integer cannot be represented in JSON (since JavaScript and JSON support\nintegers up to 2\\^53). Therefore, a 64-bit integer must be represented as a string in JSON\nrequests/responses. So the `type` property will be set to \"string\", but the\n`format` property will be set to \"int64\" to indicate that it is a 64-bit integer.\n\n\nThe JSON Schema spec already [defines a set of common\nvalues](https://tools.ietf.org/html/draft-zyp-json-schema-03#section-5.23) for the `format` property. The Google APIs Discovery Service supports some\nof these values, and defines others as well. The full list of `type` and\n`format` values supported by Google APIs Discovery Service is summarized below.\n| **Note:** The [client libraries](https://developers.google.com/api-client-library/) that we automatically generate from an API's discovery document sometimes use language-idiomatic types for these types and formats. For example: A 64-bit integer is represented as type `string` in JSON requests and responses, but our generated Java client library uses the Java `long` type."]]