Data service

API & Data Access

Open Pharmacopoeia provides machine-readable data in JSON-LD and Turtle formats. All data is accessible via static file URLs.

Data Formats

JSON-LD

Linked Data format optimized for web applications and semantic web tools.

.jsonld

Turtle (TTL)

Compact RDF format for triple stores and SPARQL endpoints.

.ttl

Available Endpoints

MethodPathDescription
GET/data/registry.jsonMachine-readable dataset registry — every dataset, its rights, edition and entry count
GET/data/search-index.jsonSlim cross-dataset title index (all datasets, titles only)
GET/data/{dataset}/{dataset}-monographs.jsonldPer-dataset entry graph — jp, phint (full monographs); thp, chp, ip, ayp, hk (indexed monographs); us, eu, uk (title index only, copyrighted)
GET/data/cross-links.jsonCross-dataset link index — {dataset}/{slug} → counterpart entries in other pharmacopoeias (open and restricted)
GET/data/substances/{slug}.jsonOne substance identity: preferred name, native names, CAS, synonyms, salt/hydrate relations, and every publisher monograph linked to it (title-only respected)
GET/data/downloads/substances.ndjsonBulk machine download — the public factual identity catalog as newline-delimited JSON (the same records as the substance endpoints)
GET/ontology/context/pharmacopoeia.jsonldGet the JSON-LD context for pharmacopoeia data
GET/ontology/core/pharmacopoeia.ttlCore (harmonized base layer) ontology in Turtle

Example Response

{
  "@context": "https://www.openphar.org/ontology/context/pharmacopoeia.jsonld",
  "@id": "https://www.openphar.org/data/jp/monographs/crude-drugs/ginseng",
  "@type": "CrudeDrugMonograph",
  "prefLabel": {
    "en": "Ginseng",
    "ja": "人参"
  },
  "publisher": { "@id": "https://www.openphar.org/ontology/publisher/JP" },
  "belongsToEdition": { "@id": "https://www.openphar.org/data/edition/jp/jp18" },
  "testSpecification": [
    {
      "@type": "TestSpecification",
      "testName": "Ginsenosides",
      "testType": "Assay",
      "limitType": "minimum",
      "limitValue": 0.20,
      "limitUnit": "%"
    }
  ]
}

Ontology & Context

The Open Pharmacopoeia ontology defines the vocabulary for pharmacopoeia data.

  • JSON-LD Context:/ontology/context/pharmacopoeia.jsonld
  • Core Ontology:/ontology/core/pharmacopoeia.ttl
  • Test Methods:/ontology/quality/test-method.ttl