{"__v":11,"_id":"56a489ae9093960d00f9ab31","category":{"__v":5,"_id":"566b59110506f40d0034f148","pages":["566b5afcec4a320d00a8ca76","566b63213d25d00d0066b00a","56a47942e5e9190d00ad6200","56a480315fb2530d00421b75","56a489ae9093960d00f9ab31"],"project":"55312174c68f493900aebb3f","version":"55312174c68f493900aebb42","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-12-11T23:15:29.864Z","from_sync":false,"order":2,"slug":"extra-parameters","title":"Extra Parameters"},"project":"55312174c68f493900aebb3f","user":"5531215e29603d2300011341","version":{"__v":10,"_id":"55312174c68f493900aebb42","project":"55312174c68f493900aebb3f","createdAt":"2015-04-17T15:06:28.598Z","releaseDate":"2015-04-17T15:06:28.598Z","categories":["55312175c68f493900aebb43","566b431d03b4b20d00d02c3a","566b58f212bc0517005d3068","566b59110506f40d0034f148","566b7cc94d1a4d0d00801c00","566b82d130cdb417008d217d","566b855b4d1a4d0d00801c04","566b856f03870a0d008ee7a7","566c42d2f0a5dc0d009acbab","566c443d85dc790d0062c134"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"0.7.0","version":"0.7"},"updates":["57a318e6bc062f0e00191832"],"next":{"pages":[],"description":""},"createdAt":"2016-01-24T08:22:06.881Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":999,"body":"By default, the Open Exchange Rates API returns responses in human-readable (pretty-printed) format, with indentation and line breaks. \n\nIf you prefer to minify your API responses to save bandwidth, you can use the `prettyprint` query parameter with any valid API route. \n\nThe data will be returned with unnecessary whitespace removed, but otherwise exactly the same.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Example Query\"\n}\n[/block]\n**Request:** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"https://openexchangerates.org/api/latest.json\\n    ?app_id=[[app:app_id]]\\n    &prettyprint=0\\n\",\n      \"language\": \"http\"\n    },\n    {\n      \"code\": \"$.get('https://openexchangerates.org/api/latest.json', {app_id: '[[app:app_id]]', prettyprint: 0}, function(data) {\\n    console.log(data);\\n});\",\n      \"language\": \"javascript\",\n      \"name\": \"jQuery\"\n    }\n  ]\n}\n[/block]\n**Response: **\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\\"disclaimer\\\": \\\"[...]\\\",\\\"license\\\":\\\"[...]\\\",\\\"timestamp\\\":1453623028,\\\"base\\\":\\\"USD\\\",\\\"rates\\\":{\\\"AED\\\":3.67289,\\\"AFN\\\":68.580001,\\\"ALL\\\":127.189901,/* ... */}}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Please note: because the default value is `1` ('true'), you need to specify `prettyprint=0` to receive minified responses.\"\n}\n[/block]","excerpt":"All of our API requests can be minified or pretty-printed.","slug":"prettyprint","type":"basic","title":"Prettyprint (Minified Responses)"}

Prettyprint (Minified Responses)

All of our API requests can be minified or pretty-printed.

By default, the Open Exchange Rates API returns responses in human-readable (pretty-printed) format, with indentation and line breaks. If you prefer to minify your API responses to save bandwidth, you can use the `prettyprint` query parameter with any valid API route. The data will be returned with unnecessary whitespace removed, but otherwise exactly the same. [block:api-header] { "type": "basic", "title": "Example Query" } [/block] **Request:** [block:code] { "codes": [ { "code": "https://openexchangerates.org/api/latest.json\n ?app_id=[[app:app_id]]\n &prettyprint=0\n", "language": "http" }, { "code": "$.get('https://openexchangerates.org/api/latest.json', {app_id: '[[app:app_id]]', prettyprint: 0}, function(data) {\n console.log(data);\n});", "language": "javascript", "name": "jQuery" } ] } [/block] **Response: ** [block:code] { "codes": [ { "code": "{\"disclaimer\": \"[...]\",\"license\":\"[...]\",\"timestamp\":1453623028,\"base\":\"USD\",\"rates\":{\"AED\":3.67289,\"AFN\":68.580001,\"ALL\":127.189901,/* ... */}}", "language": "json" } ] } [/block] [block:callout] { "type": "info", "body": "Please note: because the default value is `1` ('true'), you need to specify `prettyprint=0` to receive minified responses." } [/block]