> ## Documentation Index
> Fetch the complete documentation index at: https://docs.atomscale.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get SEM Histograms

> Retrieve feature distribution histograms for an SEM image

Returns binned distributions of the morphological features detected in an SEM image (for example, feature area, diameter, and circularity). Each requested feature is returned as its own histogram series.

<ParamField path="data_id" type="string" required>
  The data entry UUID for the SEM image
</ParamField>

<ParamField query="return_features" type="array" default="area, diameter, perimeter, axis_major_length, eccentricity, solidity, circularity, nearest_neighbor_edge_distance, nearest_neighbor_centroid_distance">
  Which feature histograms to return. Defaults to all supported features.
</ParamField>

## Response

<ResponseField name="data_id" type="string">
  Data entry UUID
</ResponseField>

<ResponseField name="series_by_feature" type="array">
  One histogram series per requested feature

  <Expandable title="properties">
    <ResponseField name="name" type="string">
      Feature name (e.g., `area`)
    </ResponseField>

    <ResponseField name="unit" type="string">
      Unit for the feature values
    </ResponseField>

    <ResponseField name="facet" type="string">
      Optional facet label for the series
    </ResponseField>

    <ResponseField name="histogram_bins" type="array">
      The histogram bins for this feature

      <Expandable title="properties">
        <ResponseField name="x0" type="number">
          Lower edge of the bin
        </ResponseField>

        <ResponseField name="x1" type="number">
          Upper edge of the bin
        </ResponseField>

        <ResponseField name="count" type="integer">
          Number of features falling within the bin
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.atomscale.ai/sem/histograms/d290f1ee-6c54-4b01-90e6-d701748f0851/",
      headers={"X-API-KEY": "YOUR_API_KEY"},
      params={"return_features": ["area", "circularity"]}
  )
  histograms = response.json()
  ```

  ```bash cURL theme={null}
  curl "https://api.atomscale.ai/sem/histograms/d290f1ee-6c54-4b01-90e6-d701748f0851/?return_features=area&return_features=circularity" \
    -H "X-API-KEY: YOUR_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "series_by_feature": [
      {
        "name": "area",
        "unit": "nm^2",
        "facet": null,
        "histogram_bins": [
          {"x0": 0.0, "x1": 100.0, "count": 12},
          {"x0": 100.0, "x1": 200.0, "count": 45},
          {"x0": 200.0, "x1": 300.0, "count": 30}
        ]
      }
    ]
  }
  ```
</ResponseExample>
