FDA Shortage Catalog Reconciler
Pricing
from $2.00 / 1,000 unique reconciled ndcs
FDA Shortage Catalog Reconciler
Reconcile catalog package NDCs against the official FDA shortage snapshot. Preserve row IDs, exact source evidence, unmatched rows and ambiguous-code diagnostics. No stock, substitution or medical-care recommendations.
Pricing
from $2.00 / 1,000 unique reconciled ndcs
Rating
0.0
(0)
Developer
Technical Dost Solutions
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
16 days ago
Last modified
Categories
Features
Share
Reconcile an inventory catalog against the top-level package identifiers in the official openFDA drug-shortages database. Get one result per input row, with your opaque row ID, explicit unmatched/invalid/ambiguous outcomes, source statuses, source publication date, and selected unchanged source evidence.
For pharmacy integration developers and inventory-data teams. This is a bounded reconciliation job, not another watchlist, alert feed, manufacturer directory, or medical recommendation engine.
Do not use these results for clinical decisions. exactMatch means a database record matched, not that a product is currently in shortage. FDA records include Current, Resolved and discontinued statuses. noListedRecord does not establish safety, availability, FDA approval, or absence of a shortage. FDA says its API results are unvalidated. Consult official FDA records and suppliers. Data is not real-time.
Quick start
Use the prefilled example, or submit:
{"rows":[{"rowId":"stock-001","packageNdc":"0228-2551-06","format":"ndc10"},{"rowId":"stock-002","packageNdc":"76045021010","format":"ndc11"},{"rowId":"stock-003","packageNdc":"0228255106","format":"ndc10"}]}
- Supply 1–1000 rows. Every row has
rowId,packageNdc, andformat. - Set a run event budget covering all prospective unique valid codes: $0.002 each, maximum $2.00 for 1000. Platform usage is separate. Insufficient budget fails before fetching/output; it does not silently truncate the catalog.
- Run, inspect
RUN_SUMMARY.status, and only accept the whole dataset when it iscompletedandresultsWrittenequals your input length. - Export JSON for nested evidence; CSV is useful for row status and source-status review. Join by
inputIndexplusrowId. Duplicate row IDs and codes are preserved; they are not unique row keys.
Use opaque catalog/SKU IDs. Never send patient identifiers, prescriptions, patient history, or other patient information. The Actor rejects extra input fields. Your input stays on Apify; requests to FDA contain only fixed pagination parameters, never your NDCs or row IDs. No API key or proxy is required. No arbitrary URLs are accepted.
Identifier rules and ambiguity
ndc10: hyphenated 4-4-2, 5-3-2, or 5-4-1. The short segment is left-padded with zero to produce an internal 5-4-2 comparison/billing key. No trimming, punctuation repair, fuzzy search, or numeric coercion.- Bare ten digits are
ambiguousCode: removing hyphens loses the segment layout. Supply the package label's segmented identifier. ndc11: explicitly declared eleven digits or 5-4-2. A unique possible NDC10 inverse is required. If zeros permit multiple inverse segment layouts, or none, returnambiguousCodeuncharged. This deliberately rejects some legitimate billing codes rather than guessing. Supply the labeled NDC10 instead.- Some official source records themselves use 5-4-2. An unambiguous source NDC11 is compared with the correctly normalized input, so format differences do not create false unmatched results. An ambiguous source NDC11 that might correspond to a valid input yields
ambiguousCode, includes candidate evidence, and is uncharged. Candidate evidence is not a confirmed match;matchedPackageNdcandmatchBasisare null. - Distinct segmented NDC10 packages that collide after zero-padding are never treated as the same confirmed package. Matching segmented input selects its own exact segmented code and any unambiguous equivalent source NDC11. All matching source rows, including duplicates and multiple statuses, are retained.
- Only top-level
package_ndcis match evidence. FDA'sopenfda.package_ndcharmonization can contain other packages; those are not automatically affected packages and are never used for matching. - Twelve-digit NDCs are currently unsupported and return
invalidCode, nevernoListedRecord. FDA's uniform 12-digit transition takes effect March 7, 2033. A new unsupported source format fails the whole snapshot rather than producing false negatives. FDA format transition. FDA explanation of 10-to-11-digit padding.
Results
| Field | Meaning |
|---|---|
inputIndex, rowId, packageNdc, format | Original catalog order and supplied identifiers |
status | exactMatch, noListedRecord, invalidCode, or ambiguousCode |
normalizedNdc11 | Comparison/billing key when derivable; not proof of drug identity |
matchedPackageNdc, sourcePackageNdcs | First confirmed source code and all source codes; candidate arrays may be present for source ambiguity |
sourceStatuses | Every distinct source status; do not assume Current |
matchBasis, reason | Exact/equivalent matching rule, or reason for invalid/ambiguous/unmatched outcome |
sourceRecords | Selected unchanged fields for all matching records, or clearly flagged ambiguity candidates |
sourceLastUpdated, fetchedAt, snapshotSha256 | FDA publication date, fetch completion time, full snapshot multiset fingerprint |
sourceUrl, disclaimer | Official API and interpretation warning |
Source evidence allowlist: package identifier, status, generic/company name, dosage form, presentation, update/initial/discontinued/resolved dates, therapeutic category, update type and shortage reason, when supplied by FDA. Contact information, free-form related-info text and harmonized openfda arrays are omitted. Source values are not rewritten or clinically interpreted. No personal contact harvesting. The full raw snapshot is transient, not exported; its fingerprint covers all raw fields.
Snapshot correctness and hard limits
Before emitting any results for valid codes, the Actor checks API robots.txt, then reads the full source twice. It requires equal totals, publication dates and complete record multisets including duplicates. There is no official transactional snapshot guarantee: two agreeing scans reduce, but cannot mathematically eliminate, upstream pagination races. If data changes between scans, rerun later.
- Fixed
https://api.fda.gov/drug/shortages.json; 1000 records per page, maximum 10,000 source records. - Refuses short/malformed pages, missing package/status fields, unexpected NDC formats, inconsistent counts, changing snapshots, empty source, or data published more than 14 UTC calendar days ago. Same-day data is accepted across UTC midnight; future publication dates are rejected. This threshold does not guarantee freshness of any individual record.
- At most 65 requests including robots/retries, 2 requests/second, 3 attempts per request, 20-second request timeout, 180-second overall source deadline. Maximum 12 MB per JSON page, 256 KB robots, 80 MB total response data. Retries for transient network failures,429 and selected5xx only; bounded Retry-After is honored, long waits fail.
- Redirects are forbidden. robots404/410 permits the official API; an explicit disallow, unknown/error response, or suspicious HTML robots file aborts. No proxy rotation or bypassing access controls.
- FDA anonymous limits: 240 requests/minute and1000/day/IP. Concurrent jobs sharing an IP may exhaust limits; the Actor does not evade them. A 1598-record snapshot needs five requests including robots, absent retries. Avoid high-frequency scheduling.
Source failures produce a failed run and summary, not noListedRecord. No result fees are charged before snapshot verification. Invalid-only batches do not access FDA and have no result-event charges.
Pricing and integration
$0.002 per unique valid NDC successfully reconciled, no start fee. Both exact matches and useful verified noListedRecord outcomes count. Repeated input rows and equivalent accepted formats share one normalized-NDC charge per run. Invalid codes, input ambiguity, and source ambiguity are uncharged. Running the same catalog again is a new reconciliation and billed again. This is not a clinical price or product availability fee.
- 1 unique reconciled code: $0.002 in result fees.
- 100 unique reconciled codes: $0.20.
- 1000 unique reconciled codes: $2.00.
- Apify platform usage is paid separately by the user, including failed, empty and invalid-only runs. Small batches have proportionally higher usage overhead because a full source snapshot is required. Actual usage depends on runtime and platform rates; examples are not all-in quotes.
The runtime verifies exactly one configured event, reconciled-ndc, at $0.002 and refuses pricing drift or additional charged event types. It preflights the full prospective budget, then uses Actor.pushData(row, eventName) once per newly reconciled canonical code. Other rows are pushed without that event. No separate/manual duplicate charge call. Event-specific SDK count is verified; zero-charge delivery does not claim completion. Uncertain dataset/charge writes are never retried. A failed output phase may leave partial rows and incurred fees: inspect RUN_SUMMARY and never treat a failed run's dataset as complete. As with all cloud workloads, interrupted/killed runs are not resumable transactional deliveries.
REST integration: start this Actor with the example JSON as input through Apify's Run Actor API, poll the run to completion, then retrieve its default dataset and RUN_SUMMARY from the default key-value store. Use your Apify credentials in the authorization header, never in input rows. SDK clients can use the Actor's run defaultDatasetId and defaultKeyValueStoreId. Require both Apify run success and summary completed before importing. No patient data, notifications or substitutions are generated.
Data source and rights
Data provided by the U.S. Food and Drug Administration (openFDA). This independent Actor is not affiliated with or endorsed by FDA. Terms generally dedicate openFDA materials to CC0, including commercial use, with exceptions for explicitly marked third-party works. Users must respect applicable terms and restrictions. Use of the API accepts its terms; no guarantee of accuracy, uptime or medical suitability is made.
Development
Node22 image apify/actor-node:22; dependencies pinned in package-lock.json. npm ci, npm test, npm run validate. npm run smoke performs the bounded read-only live verification and saves a local report; it does not bill or publish. On a local Node24 environment that requires an existing HTTPS proxy, NODE_USE_ENV_PROXY=1 npm run smoke uses the environment's configured transport. Production runs use normal native fetch on Apify.