---
title: GET /v1/lookup/pubchem
description: "Search PubChem by compound name — Searches PubChem by compound name. Each result carries the compound id, name, formula and isomeric SMILES."
full: true
---

**Auth:** required. Send an `ivy_` API key (`Authorization: Bearer ivy_…`), a signed-in session token (`Authorization: Bearer …`) or the session cookie (browser sessions). See [Authentication](/docs/api/authentication).

Searches PubChem by compound name. Each result carries the compound id, name, formula and isomeric SMILES.

## Request

### Query parameters

- `ligand_name` (string) —
Compound name to search for, for example `aspirin`.

- `limit` (integer) —
Maximum number of results.

## Responses

### `200` OK

Matching compounds

Response shape: `object[]`

### `401` Unauthorized

Authentication required

Response shape: `object`

### `422` Unprocessable Entity

A required query parameter is missing or out of range; the body says which

Response shape: `object`

### `429` Too Many Requests

Rate limit exceeded

Response shape: `object`

### `502` Bad Gateway

The compute service is unavailable. Retry with backoff.

Response shape: `object`

**curl**

```bash
curl -X GET 'https://ivybiosciences.com/api/v1/lookup/pubchem' \
  -H "Authorization: Bearer $IVY_API_KEY"
```

**JavaScript**

```js
const res = await fetch('https://ivybiosciences.com/api/v1/lookup/pubchem', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.IVY_API_KEY}`,
  },
});
const data = await res.json();
```

**Python**

```python
import os, requests

res = requests.get(
    "https://ivybiosciences.com/api/v1/lookup/pubchem",
    headers={"Authorization": f"Bearer {os.environ['IVY_API_KEY']}"},
)
data = res.json()
```
