> ## 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 XPS Data

> Retrieve X-ray photoelectron spectroscopy data and analysis

Returns processed XPS data including binding energies, intensities, predicted composition, and detected peaks.

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

## Response

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

<ResponseField name="xps_id" type="string">
  XPS results identifier
</ResponseField>

<ResponseField name="binding_energies" type="array">
  Binding energy values (eV)
</ResponseField>

<ResponseField name="intensities" type="array">
  Intensity/count values corresponding to binding energies
</ResponseField>

<ResponseField name="predicted_composition" type="object">
  Predicted elemental composition
</ResponseField>

<ResponseField name="composition_uncertainty" type="object">
  Uncertainty values for the predicted composition
</ResponseField>

<ResponseField name="set_elements" type="array">
  User-specified elements for analysis
</ResponseField>

<ResponseField name="predicted_elements" type="array">
  Elements predicted from the spectrum
</ResponseField>

<ResponseField name="predicted_formula" type="string">
  Predicted chemical formula
</ResponseField>

<ResponseField name="detected_peaks" type="array">
  Detected peaks in the spectrum
</ResponseField>

<ResponseField name="dict_formula" type="object">
  Formula as a dictionary of element counts
</ResponseField>

<ResponseField name="last_updated" type="string">
  ISO 8601 timestamp of last update
</ResponseField>

<RequestExample>
  ```python SDK theme={null}
  from atomscale import Client

  client = Client(api_key="YOUR_API_KEY")
  results = client.get(data_ids="d290f1ee-6c54-4b01-90e6-d701748f0851")
  xps = results[0]  # XPSResult
  print(xps.predicted_composition)
  print(xps.detected_peaks)
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.atomscale.ai/xps/d290f1ee-6c54-4b01-90e6-d701748f0851",
      headers={"X-API-KEY": "YOUR_API_KEY"}
  )
  xps_data = response.json()
  ```

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

<ResponseExample>
  ```json 200 theme={null}
  {
    "data_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "xps_id": "xps_001",
    "binding_energies": [0, 10, 20, 30],
    "intensities": [1000, 1200, 1100, 900],
    "predicted_composition": {"Ga": 0.485, "As": 0.472, "O": 0.031, "C": 0.012},
    "composition_uncertainty": {"Ga": 0.02, "As": 0.02, "O": 0.01, "C": 0.005},
    "set_elements": [],
    "predicted_elements": ["Ga", "As", "O", "C"],
    "predicted_formula": "GaAs",
    "detected_peaks": [{"element": "Ga3d", "position": 19.2}],
    "dict_formula": {"Ga": 1, "As": 1},
    "last_updated": "2024-01-15T10:35:00Z"
  }
  ```
</ResponseExample>
