> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://uploadcare.com/docs/llms.txt.

# File info as JSON

GET https://ucarecdn.com/{uuid}/-/json/

Returns file-related information, such as image dimensions or geo
tagging data in the JSON format.


Reference: https://uploadcare.com/docs/api/url/file-information/file-info-json

## Request

### Path parameters

- `uuid` (string, required) — Unique file identifier

## Response

### 200

File

- `id` (string, required) — File UUID.
- `dpi` (list of double, optional, nullable) — Image DPI for two dimensions.
- `width` (integer, optional) — Image width in pixels.
- `format` (string, optional) — Image format.
- `height` (integer, optional) — Image height in pixels.
- `sequence` (boolean, optional) — Set to true if a file contains a sequence of images (GIF for example).
- `color_mode` (enum, optional) — Image color mode.
  - Allowed values: `RGB`, `RGBA`, `RGBa`, `RGBX`, `L`, `LA`, `La`, `P`, `PA`, `CMYK`, `YCbCr`, `HSV`, `LAB`
- `orientation` (integer, optional, nullable) — Image orientation from EXIF.
- `geo_location` (FileGeoLocation, optional, nullable) — Geo-location of image from EXIF.
- `datetime_original` (datetime, optional, nullable) — Image date and time from EXIF. Please be aware that this data is not always formatted and displayed exactly as it appears in the EXIF.
- `hash` (string, optional, nullable) — A 64-bit perceptual hash represented as a hexadecimal string, calculated from the image’s pixel content. Learn more about [Perceptual hash](/docs/cdn-operations/#operation-json-phash).
- `blurhash` (string, optional, nullable) — A compact string representation of the image, allowing reconstruction of its general structure and color scheme without details, useful as a blurred placeholder until the full image loads. Learn more about [Blurhash](/docs/cdn-operations/#operation-json-blurhash).

## Types

### FileGeoLocation

Geo-location of image from EXIF.

- `latitude` (double, required) — Location latitude.
- `longitude` (double, required) — Location longitude.

## Examples

**Response**

```json
{
  "id": "d7fe74ac-65b8-4ade-875f-ccd92759a70f",
  "dpi": [
    300,
    300
  ],
  "width": 3432,
  "format": "JPEG",
  "height": 3432,
  "sequence": false,
  "color_mode": "RGB",
  "orientation": null,
  "geo_location": null,
  "datetime_original": {},
  "hash": "e98d9466a33a9c8b"
}
```

**SDK Code**

```python
import requests

url = "https://ucarecdn.com/d7fe74ac-65b8-4ade-875f-ccd92759a70f/-/json/"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'https://ucarecdn.com/d7fe74ac-65b8-4ade-875f-ccd92759a70f/-/json/';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://ucarecdn.com/d7fe74ac-65b8-4ade-875f-ccd92759a70f/-/json/"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://ucarecdn.com/d7fe74ac-65b8-4ade-875f-ccd92759a70f/-/json/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://ucarecdn.com/d7fe74ac-65b8-4ade-875f-ccd92759a70f/-/json/")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://ucarecdn.com/d7fe74ac-65b8-4ade-875f-ccd92759a70f/-/json/');

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://ucarecdn.com/d7fe74ac-65b8-4ade-875f-ccd92759a70f/-/json/");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://ucarecdn.com/d7fe74ac-65b8-4ade-875f-ccd92759a70f/-/json/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```