> For the complete documentation index, see [llms.txt](https://doc.duaer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/getting-started/alexandria.md).

# Alexandria in Duaer

In Duaer: Millions of DFT structures in the Alexandria PBE database by formula or elements: band gap, formation energy, and distance to the hull. One successful search uses 1 credit.
## What you get

Duaer Alexandria searches the Alexandria PBE database over OPTIMADE. It holds millions of computed structures, including many not found in other databases.

Pick Duaer Data → Alexandria in the node creator, or open the [data market](/getting-started/data-market.md). Related: [AFLOW](/getting-started/aflow.md), [Materials Project](/getting-started/materials-project.md).

## When to use it

- Check whether a composition is predicted stable (hull distance near 0).
- Find computed structures beyond Materials Project.

## When not to use it

- Experimental structures. Use [Crystal structures (COD)](/getting-started/cod.md).
- Curated properties with elastic data. Use [JARVIS-DFT](/getting-started/jarvis.md).

## Search on the canvas

1. Open the node creator and pick Duaer Data → Alexandria.
2. Fill Formula (such as GaAs) or Elements (such as Ga,As).
3. Limit defaults to 10, max 20. Execute.

A search uses 1 credit only when it returns rows. No rows, wrong input, or an upstream failure uses 0.

## Call the API

- GET https://api.duaer.com/v1/data/alexandria?formula=GaAs
- Authorization: Bearer <Duaer key>

The call skill below matches Copy skill in the Duaer data market, with parameters, examples, and result fields.

## Call skill

Same text as Copy skill.

```
---
name: duaer-alexandria
description: >-
  Duaer Alexandria. Millions of DFT structures in the Alexandria PBE database by formula or elements: band gap, formation energy, and distance to the hull.
  One successful search uses 1 Duaer credit.
---

# Duaer Alexandria

Duaer Alexandria searches the Alexandria PBE database over OPTIMADE. It holds millions of computed structures, including many not found in other databases.

## When to use

- Check whether a composition is predicted stable (hull distance near 0).
- Find computed structures beyond Materials Project.

## When not to use

- Experimental structures. Use https://skills.duaer.com/cod.md.
- Curated properties with elastic data. Use https://skills.duaer.com/jarvis.md.

## Call

`GET https://api.duaer.com/v1/data/alexandria?formula=GaAs`

Header: `Authorization: Bearer <Duaer key>`

Use an account key or a model API key.

Get a Duaer key: https://skills.duaer.com/keys.md

## Parameters

Provide `formula` or `elements`.

- `formula` — Formula such as GaAs. Matches the reduced formula.
- `elements` — Optional. Materials that contain all of these, such as Ga,As.
- `limit` — Optional. Rows to return, from 1 to 20. Default 10.

## Examples

- `GET https://api.duaer.com/v1/data/alexandria?formula=GaAs` — GaAs structures with band gap and stability.
- `GET https://api.duaer.com/v1/data/alexandria?elements=Na,S&limit=5` — sodium-sulfur compounds.

## Result

The response is `{ "items": [...] }`. Each item has `source`, `title`, `url`, and `summary`, plus:

- `alexandriaId` — Alexandria id.
- `formula`, `elements`, `sites` — reduced formula, elements, and atoms in the cell.
- `spaceGroupNumber` — symmetry.
- `bandGapEv`, `formationEnergyEvPerAtom`, `energyAboveHullEv` — gap, formation energy, and distance to the convex hull.

Fields without a value are left out.

## Credits

A search that returns at least one row uses 1 credit.
An empty search, a search that finds nothing, or a failed search uses 0.
Wrong input returns 400 with a message and uses 0.
No remaining credits returns 402 and does not search.
A missing key returns 401.

## Related

- https://skills.duaer.com/aflow.md — Duaer AFLOW
- https://skills.duaer.com/materials-project.md — Duaer Materials Project

```
## Questions

### How many credits does a Alexandria search use in Duaer?

One credit when Duaer returns rows. A search with no rows or an error uses 0.

### What does hull distance mean in Duaer Alexandria?

In Duaer Alexandria, energyAboveHullEv near 0 means the structure is likely stable.

## Related

- [AFLOW in Duaer](https://doc.duaer.com/getting-started/aflow.md)
- [Materials Project in Duaer](https://doc.duaer.com/getting-started/materials-project.md)

