PubChem Structure Image Service

Generates 2D and 3D structure images for chemical compounds by CID, SID, SMILES, or InChI. Returns PNG images at configurable sizes, suitable for embedding in applications and documents.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/pubchem-structure-image-service"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

API entry from apis.yml

apis.yml Raw ↑
name: PubChem Structure Image Service
description: Generates 2D and 3D structure images for chemical compounds by CID, SID, SMILES, or InChI.
  Returns PNG images at configurable sizes, suitable for embedding in applications and documents.
humanURL: https://pubchem.ncbi.nlm.nih.gov/docs/pug-rest#section=PNG
baseURL: https://pubchem.ncbi.nlm.nih.gov/rest/pug
tags:
- Structure Images
- 2D Structures
- Visualization
properties:
- type: Documentation
  url: https://pubchem.ncbi.nlm.nih.gov/docs/pug-rest#section=PNG
contact:
- FN: PubChem Help Desk
  email: pubchem-help@ncbi.nlm.nih.gov
operations:
- summary: Get compound 2D structure image by CID
  method: GET
  path: /compound/cid/{cid}/PNG
  description: Returns a PNG image of the 2D chemical structure for the given compound ID. Size can be
    controlled with the image_size parameter.
- summary: Get compound image by name
  method: GET
  path: /compound/name/{name}/PNG
  description: Returns a PNG image of the 2D chemical structure for a compound looked up by name.
- summary: Get compound image by SMILES
  method: GET
  path: /compound/smiles/{smiles}/PNG
  description: Returns a PNG image of the 2D chemical structure for the compound specified by SMILES string.