API Reference

Verify

GET/v1/verify/{fingerprint}

Verify a 128-bit binary fingerprint and retrieve the exact FDA source. Provides cryptographic proof of citations with mathematical certainty.

Overview

The Verify endpoint enables independent verification of citations with cryptographic certainty. Anyone can verify that a fingerprint corresponds to exact FDA source text - even months or years after the original search.

Verification uses XOR-based Hamming distance for mathematical proof. A Hamming distance of 0 means exact match (verified). Any non-zero distance means the fingerprint doesn't match (not verified).

Path Parameters

fingerprintstringrequired

128-character binary string (0s and 1s only). The fingerprint must be exactly 128 bits and contain only valid binary digits.

Example Fingerprint:

11110011110101100001010001100111010000100001110011100000011111000100011110100100100100000011010111110000110000111000100001010010

Response Structure

Responses follow a standard structure with status: 1, msg, and data containing the verification result. When a fingerprint is found, data contains verification details. When not found, data.detail will be "Not Found".

statusinteger

Response status. 1 indicates success.

msgstring

Status message, typically "operation successful".

dataobject

The verification result data. The structure differs based on whether the fingerprint is found:

When fingerprint is NOT found:

detailstring

Contains "Not Found" when the fingerprint is not in the verify database.

When fingerprint IS found:

verifiedboolean

True if exact match found (Hamming distance = 0), false otherwise.

textstring | null

FDA label text segment (null if not verified).

drugobject | null

Drug information (null if not verified).

sectionstring | null

Document section (null if not verified).

sourceobject | null

Source URL (null if not verified).

messagestring | null

Error message explaining why verification failed (null if successful).

Use Cases

Legal/Court Verification

Prove a citation corresponds to exact FDA source with mathematical certainty. Admissible in legal proceedings as cryptographic proof.

Citation Checking

Verify claims made in research papers or medical reports. Peer reviewers can independently verify citations without trusting the author.

Audit Compliance

Show regulatory bodies exact FDA sources with mathematical proof. No ambiguity - either verified or not verified.

Long-term Citation Integrity

Verify citations months or years after original search. Fingerprints remain valid indefinitely unless FDA source changes.

Important Notes

Fingerprint must be exactly 128 characters long. Shorter or longer strings will be rejected.

Note: Not all fingerprints returned by the Search API may be available in the Verify database. If a fingerprint from search results returns "Not Found", it means that specific fingerprint is not currently indexed in the verify database. The verify endpoint is working correctly, but has limited coverage compared to the search endpoint.

Fingerprint must contain only binary digits (0s and 1s). Any other characters will cause validation failure.

Hamming distance = 0 means exact match. This provides cryptographic-level certainty of verification.

Error Responses

All error responses follow a standard structure with status: 0, errorCode, and msg fields:

400

Bad Request

Invalid fingerprint format (wrong length or invalid characters)

{ "status": 0, "errorCode": "", "msg": "invalid data" }
404

Not Found

Fingerprint not found in database

{ "status": 0, "errorCode": "", "msg": "resource not found" }
500

Internal Server Error

Server error or service temporarily unavailable

{ "status": 0, "errorCode": "", "msg": "internal server error" }
curl
curl -X GET "https://api.lemma.la/v1/verify/11110011110101100001010001100111010000100001110011100000011111000100011110100100100100000011010111110000110000111000100001010010" \
  -H "x-api-key: YOUR_API_KEY"

Success Response

200 OK - Verified
{
  "status": 1,
  "msg": "operation successful",
  "data": {
    "verified": true,
    "text": "Stop use and ask a doctor if pain gets worse...",
    "fingerprint": "11110011110101100001010001100111...",
    "drug": {
      "name": "aspirin",
      "brand_names": ["Low Dose Aspirin Enteric Safety-Coated"],
      "manufacturer": "P & L Development, LLC",
      "ndc": ["59726-867"],
      "route": ["ORAL"]
    },
    "section": "Warnings",
    "source": {
      "url": "https://dailymed.nlm.nih.gov/dailymed/..."
    },
    "message": null
  }
}

Failure Response

200 OK - Not Verified
{
  "status": 1,
  "msg": "operation successful",
  "data": {
    "detail": "Not Found"
  }
}