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

# Socket.dev

> Supply chain security API detecting malware, typosquats, and vulnerabilities in open-source dependencies.

Supply chain security API detecting malware, typosquats, and vulnerabilities in open-source dependencies. Best for automated security scanning of package manifests, monitoring dependency alerts, and tracking threat intelligence across npm, PyPI, and other ecosystems. Requires a user-provided API key (BYOK).

16 endpoints available through Lava's AI Gateway. See the [Socket.dev API docs](https://docs.socket.dev/reference) for full documentation.

<Warning>This provider requires your own credentials — connect your API key or OAuth account before use.</Warning>

## Endpoints

### List organizations

**GET** `https://api.socket.dev/v0/organizations` — \$0.005 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.socket.dev/v0/organizations', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.socket.dev%2Fv0%2Forganizations" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Look up package info

**POST** `https://api.socket.dev/v0/packages` — \$0.005 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.socket.dev/v0/packages', { body: {"purl":"pkg:npm/express@4.18.2"} });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.socket.dev%2Fv0%2Fpackages" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"purl":"pkg:npm/express@4.18.2"}'
    ```
  </Tab>
</Tabs>

### Get supported file types for scanning

**GET** `https://api.socket.dev/v0/scans/supported-files` — \$0.005 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.socket.dev/v0/scans/supported-files', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.socket.dev%2Fv0%2Fscans%2Fsupported-files" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Create a full scan for an organization

**POST** `https://api.socket.dev/v0/orgs/my-org/scans` — \$0.005 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.socket.dev/v0/orgs/my-org/scans', { method: 'POST' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.socket.dev%2Fv0%2Forgs%2Fmy-org%2Fscans" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json"
    ```
  </Tab>
</Tabs>

### List scans for an organization

**GET** `https://api.socket.dev/v0/orgs/my-org/scans` — \$0.005 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.socket.dev/v0/orgs/my-org/scans', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.socket.dev%2Fv0%2Forgs%2Fmy-org%2Fscans" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Get scan details

**GET** `https://api.socket.dev/v0/orgs/my-org/scans/scan-123` — \$0.005 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.socket.dev/v0/orgs/my-org/scans/scan-123', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.socket.dev%2Fv0%2Forgs%2Fmy-org%2Fscans%2Fscan-123" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Get scan metadata

**GET** `https://api.socket.dev/v0/orgs/my-org/scans/scan-123/metadata` — \$0.005 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.socket.dev/v0/orgs/my-org/scans/scan-123/metadata', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.socket.dev%2Fv0%2Forgs%2Fmy-org%2Fscans%2Fscan-123%2Fmetadata" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### List diff scans for an organization

**GET** `https://api.socket.dev/v0/orgs/my-org/diffs` — \$0.005 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.socket.dev/v0/orgs/my-org/diffs', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.socket.dev%2Fv0%2Forgs%2Fmy-org%2Fdiffs" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Create a diff scan

**POST** `https://api.socket.dev/v0/orgs/my-org/diffs` — \$0.005 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.socket.dev/v0/orgs/my-org/diffs', { method: 'POST' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.socket.dev%2Fv0%2Forgs%2Fmy-org%2Fdiffs" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json"
    ```
  </Tab>
</Tabs>

### Look up org-scoped packages

**POST** `https://api.socket.dev/v0/orgs/my-org/packages` — \$0.005 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.socket.dev/v0/orgs/my-org/packages', { method: 'POST' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.socket.dev%2Fv0%2Forgs%2Fmy-org%2Fpackages" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json"
    ```
  </Tab>
</Tabs>

### Search dependencies within an organization

**POST** `https://api.socket.dev/v0/orgs/my-org/dependencies/search` — \$0.005 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.socket.dev/v0/orgs/my-org/dependencies/search', { body: {"query":"lodash"} });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.socket.dev%2Fv0%2Forgs%2Fmy-org%2Fdependencies%2Fsearch" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"query":"lodash"}'
    ```
  </Tab>
</Tabs>

### Get dependency trends

**GET** `https://api.socket.dev/v0/orgs/my-org/dependencies/trend` — \$0.005 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.socket.dev/v0/orgs/my-org/dependencies/trend', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.socket.dev%2Fv0%2Forgs%2Fmy-org%2Fdependencies%2Ftrend" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### List repositories in an organization

**GET** `https://api.socket.dev/v0/orgs/my-org/repos` — \$0.005 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.socket.dev/v0/orgs/my-org/repos', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.socket.dev%2Fv0%2Forgs%2Fmy-org%2Frepos" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### List alerts for an organization

**GET** `https://api.socket.dev/v0/orgs/my-org/alerts` — \$0.005 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.socket.dev/v0/orgs/my-org/alerts', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.socket.dev%2Fv0%2Forgs%2Fmy-org%2Falerts" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### List historical alerts

**GET** `https://api.socket.dev/v0/orgs/my-org/alerts/historical` — \$0.005 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.socket.dev/v0/orgs/my-org/alerts/historical', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.socket.dev%2Fv0%2Forgs%2Fmy-org%2Falerts%2Fhistorical" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Get threat intelligence feed

**GET** `https://api.socket.dev/v0/orgs/my-org/threat-feed` — \$0.005 / request

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://api.socket.dev/v0/orgs/my-org/threat-feed', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fapi.socket.dev%2Fv0%2Forgs%2Fmy-org%2Fthreat-feed" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

## Next Steps

<CardGroup cols={2}>
  <Card title="All Providers" icon="grid" href="/gateway/supported-providers">
    Browse all supported AI providers
  </Card>

  <Card title="Forward Proxy" icon="route" href="/gateway/forward-proxy">
    Learn how to construct proxy URLs and authenticate requests
  </Card>
</CardGroup>
