REST API Documentation
Base URL: https://pkaatlas.com
All endpoints below use GET and can be accessed without an API key. Responses are JSON, except structure images (SVG) and record exports (CSV).
URL-encode SMILES and other parameter values containing characters such as #, + or &. Search results contain records; one compound may have multiple measurements.
Version and audit endpoints
curl "https://pkaatlas.com/api/v1/release"
Open example
Inspect a source record and its representative membership:
curl "https://pkaatlas.com/api/v1/record/49ada355a6a2:2"
Open example
Search the complete archive, including quarantined and unresolved rows:
curl "https://pkaatlas.com/api/v1/search?scope=all&limit=10"
Open example
/api/v1/search
Search pKa measurements by compound, pKa range, solvent, or quality grade.
Parameters
Default scope: representatives (149,189 records).
Use scope=all (174,082), scope=eligible (150,994), or scope=quarantine (23,088).
Use entity_kind=structure_defined|protein_site_context|unresolved_record to filter an identity class.
Every result includes source_row_id, candidate_record_id, qc_status, exclude_reason and review annotations. Count definitions and complete downloads.
| Parameter | Type | Description | Example |
|---|---|---|---|
q | string | SMILES, stored identifier, reference, dataset name, or available natural-product name/class. Name coverage depends on the source. | ?q=CCO |
smiles | string | Exact parsed canonical structure match | ?smiles=CCO |
inchi_key | string | Exact match to a non-null inchi_key returned by this API; availability depends on the source. | Use a value from a returned record. |
pka_min | float | Minimum pKa value | ?pka_min=3.0 |
pka_max | float | Maximum pKa value | ?pka_max=7.0 |
solvent | string | Filter by solvent | ?solvent=water |
confidence | string | Comma-separated quality grades: Grade A, Grade B, Grade C, Grade D (API values: A,B,C,D) | ?confidence=A,B |
data_type | string | experimental / predicted | ?data_type=experimental |
temperature_min | float | Minimum temperature in °C; records without temperature are excluded. | ?temperature_min=20 |
temperature_max | float | Maximum temperature in °C | ?temperature_max=30 |
pka_type | string | Exact pKa type as stored in a record | ?pka_type=pKaH1 |
reference | string | Exact reference code | ?reference=B29 |
dataset_name | string | Exact source dataset name | ?dataset_name=IUPAC_high_confidence_v2.3 |
limit | int | Measurements per page: use 1–500; default 50. | ?limit=50 |
offset | int | Number of records to skip; use a non-negative value, default 0. | ?offset=0 |
Example
curl "https://pkaatlas.com/api/v1/search?pka_min=3&pka_max=7&solvent=water&confidence=A,B&limit=20"
Open example
Response fields: total, limit, offset, page, total_pages, has_next, has_prev and results. Use each result's compound_id for compound details.
/api/v1/compound/<id>
Get full compound information with all pKa measurements.
Example
curl "https://pkaatlas.com/api/v1/compound/42"
Open example
Returns compound and measurements. An unknown ID returns HTTP 404.
/api/v1/stats
Get database statistics, solvent distribution, and NP distribution.
Example
curl "https://pkaatlas.com/api/v1/stats"
Open example
Returns stats, solvent_distribution and np_distribution for the current online dataset.
/api/v1/compounds/count
Quick endpoint to get total compound count.
Example
curl "https://pkaatlas.com/api/v1/compounds/count"
Open example
Current Response
Loading current compound count…
/api/v1/substructure
Retrieve matching structures using RDKit with fingerprint pre-screening, up to the requested result limit.
| Parameter | Type | Description |
|---|---|---|
smiles | string (required) | Query SMILES. The examples use SMILES; SMARTS support is limited. |
max_results | int | Max hits (default 100, max 500) |
include_pka | optional | Set to 1 to include pKa range and measurement count. Omit this parameter to leave these fields out. |
Example
curl "https://pkaatlas.com/api/v1/substructure?smiles=c1ccccc1O&max_results=50&include_pka=1"
Open example
Returns query_smiles, total_hits, max_results and results. total_hits counts returned hits and is subject to the result limit. Missing or invalid query SMILES returns HTTP 400.
/api/v1/similarity
Similarity search — Morgan2 fingerprint Tanimoto similarity.
| Parameter | Type | Description |
|---|---|---|
smiles | string (required) | Query SMILES |
threshold | float | Minimum Tanimoto similarity, 0–1; default 0.4. |
max_results | int | Maximum returned hits: default 50, max 200. |
Example
curl "https://pkaatlas.com/api/v1/similarity?smiles=CCO&threshold=0.6"
Open example
Results are sorted by descending similarity. Missing or invalid query SMILES returns HTTP 400.
/api/v1/image/<smiles>
Generate 2D structure SVG image from SMILES or compound ID.
| Parameter | Type | Description |
|---|---|---|
width | int | Image width (default 400) |
height | int | Image height (default 200) |
highlight | string | SMILES substructure to highlight in red |
Examples
curl "https://pkaatlas.com/api/v1/image/CCO?width=300&height=150"
Open example
curl "https://pkaatlas.com/api/v1/image/compound/42?width=500&height=250"
Open example curl "https://pkaatlas.com/api/v1/image/c1ccccc1O?highlight=c1ccccc1"
Open example Response type: image/svg+xml. A structure that cannot be rendered produces an SVG error message.
/api/v1/exportDownload filtered source or representative records as UTF-8 CSV. For an uncapped complete layer, use full compressed downloads.
Supported filters: q, smiles, pka_min, pka_max, solvent, confidence, data_type, temperature_min, temperature_max and pka_type. limit defaults to 10,000 and is capped at 50,000 records. Use offset to continue after any non-negative number of matching rows. All search filters, including scope, entity_kind, np_only, inchi_key, reference and dataset_name, are supported.
curl "https://pkaatlas.com/api/v1/export?solvent=DMSO&limit=100"
Open example
To save the file from a terminal, append -o pkaatlas_DMSO.csv to the command. Headers X-Total-Count, X-Exported-Count and X-Dataset-Version identify the result size and version. Original full fields remain in the complete archives.
/api/v1/structure/statsCheck structure-search readiness. total_compounds counts structures available to RDKit and can be lower than the database compound count; ready indicates initialization status.
curl "https://pkaatlas.com/api/v1/structure/stats"
Open example
/api/v1/provenanceGet the source-compilation registry, keyed by dataset name. Registry entry counts describe the source compilations and may differ from counts retained in the online dataset.
curl "https://pkaatlas.com/api/v1/provenance"
Open example
/api/v1/provenance/<dataset_name>Get compilation metadata and provenance information for an exact dataset name. An unknown name returns HTTP 404.
curl "https://pkaatlas.com/api/v1/provenance/IUPAC_high_confidence_v2.3"
Open example
/api/v1/documentsGet the document registry as total and documents. This endpoint returns document metadata.
curl "https://pkaatlas.com/api/v1/documents"
Open example
/healthGet service status, timestamp, loaded compound and measurement counts, and RDKit readiness.
curl "https://pkaatlas.com/health"
Open example
Click a button to send a GET request to https://pkaatlas.com.