changedInput schema / properties / canvas_id / description
Previous value: -"Canvas ID returned by a prior stage=true call to this tool or another openFDA search tool (openfda_search_* or openfda_lookup_ndc). Passing one stages this search onto that canvas (same effect as stage=true) so result sets accumulate for cross-table joins. Omit to stage onto a fresh canvas."New value: +"canvas_id from an earlier staged call to openfda_search_* or openfda_lookup_ndc: stages this call onto that canvas too (as stage=true does), so its tables can be joined."
changedInput schema / properties / category / enum
Previous value: -[
- "drug",
- "food",
- "device"
-]New value: +[
+ "drug",
+ "food",
+ "device",
+ "cosmetic"
+]
addedInput schema / properties / cursor
Added value: +{
+ "description": "next_cursor from the previous page, with no skip and the same search, sort, and endpoint as that call; other inputs may change.",
+ "pattern": "^[A-Za-z0-9_-]+$",
+ "type": "string"
+}
changedInput schema / properties / fields / description
Previous value: -"Dotted record paths to keep on each returned record, e.g. [\"receivedate\", \"patient.drug.medicinalproduct\"] — any key path on a returned record works, and openfda_describe_fields lists the searchable ones. Each record is projected to these paths plus its identity key (safetyreportid, report_number, mdr_report_key), identically on both response surfaces, and a path through an array applies to every element. Use it when records are large: when a record on the page serializes above 24000 bytes, page_bytes reports the page's size and page_largest_fields names the largest record's biggest fields. A path no returned record carries is named on the notice. Omit for whole records. Paths take only letters, digits, underscores, and dots; anything else is rejected before the request. With stage=true, only the inline page is projected — the staged table keeps its columns."New value: +"Dotted record paths to keep on each record, e.g. [\"receivedate\", \"patient.drug.medicinalproduct\"], plus its identity key (safetyreportid, report_number, mdr_report_key). Any record path works (openfda_describe_fields lists searchable ones); a path through an array covers every element. Use it when page_bytes flags an oversized record; with stage=true only the inline page is projected."
addedInput schema / properties / include
Added value: +{
+ "description": "Paths left out of each record by default, to return: patient.drug.openfda on drug. Name one whole, or a path beneath one for that field alone; with fields, entries join the projection. A search clause on a left-out path also returns it.",
+ "items": {
+ "pattern": "^(?!\\.)(?!.*\\.\\.)(?!.*\\.$)[A-Za-z0-9_.]+$",
+ "type": "string"
+ },
+ "type": "array"
+}
changedInput schema / properties / limit / description
Previous value: -"Records per page. Default and cap by category: drug 5 (cap 25), food 25 (cap 1000), device 10 (cap 175); a larger value returns at most that cap and says so."New value: +"Records per page. Default and cap by category: drug 5 (cap 25), food 25 (cap 1000), device 10 (cap 175), cosmetic 25 (cap 1000); a larger value returns at most that cap and says so."
changedInput schema / properties / search / description
Previous value: -"openFDA search query. Examples: patient.drug.medicinalproduct:\"aspirin\", patient.reaction.reactionmeddrapt:\"nausea\" AND serious:\"1\". Omit both search and sort to browse the newest reports first. Separate clauses with spaces. A \"+\" written in the URL style of openFDA's examples also reads as a space where it separates: beside AND, OR, NOT, or TO, after a closing quote, paren, or bracket, or between a term and the next \"field:\" prefix (a:\"x\"+AND+b:\"y\", [20200101+TO+20201231], c:x+d:y). In a query that marks a clause required with a leading +field:, only the AND/OR/NOT/TO positions read that way. Any other \"+\" is sent as written, and inside a quoted phrase \"+\" is a literal plus sign. Double quotes, parentheses, and range brackets must balance, and the query must not end on a backslash — each is rejected before the request."New value: +"openFDA search query, e.g. patient.drug.medicinalproduct:\"aspirin\", patient.reaction.reactionmeddrapt:\"nausea\" AND serious:\"1\". Omit both search and sort to browse the newest reports first. A \"+\" between clauses reads as a space; inside a quoted phrase it is a literal plus."
changedInput schema / properties / skip / description
Previous value: -"Number of records to skip for pagination (default 0). openFDA caps pagination at 25000 records; a higher value returns a pagination_limit_reached error."New value: +"Records to skip, at most 25000; to read past that, follow next_cursor from skip 0."
changedInput schema / properties / sort / description
Previous value: -"Sort expression — a field path optionally suffixed with :asc or :desc (any letter case; :ascending and :descending are also accepted, and every direction is sent as asc or desc); comma-separate for multi-field sort. Field paths take only letters, digits, underscores, and dots; any other character or direction is rejected before the request. Sortable date fields are category-specific: drug → receivedate (or receiptdate), food → date_created (or date_started), device → date_received (or date_of_event). A field from another category (e.g. receivedate on food or device) causes a query error — use the field for this category. With search also omitted, the default is newest first: drug receivedate:desc, food date_created:desc, device date_received:desc. A search with no sort keeps openFDA's own order."New value: +"A field path with :asc or :desc (any letter case; :ascending and :descending also work), several comma-separated. With neither search nor sort, records come newest first by the category's received date (drug receivedate:desc, food date_created:desc, device date_received:desc, cosmetic initial_received_date:desc). A search without sort returns openFDA's index order, not relevance. Sortable date fields are category-specific: drug → receivedate (or receiptdate), food → date_created (or date_started), device → date_received (or date_of_event), cosmetic → initial_received_date (or latest_received_date)."
changedInput schema / properties / stage / description
Previous value: -"Stage the matched set on a DataCanvas for SQL analysis — openfda_dataframe_describe lists the staged columns, openfda_dataframe_query runs the SQL. Default false — the call returns one page for one upstream request. When true, records are also drained onto a canvas table up to a size budget (staged_rows reports how many reached it). Staging is for record-level SQL over a bounded slice; for a distribution over everything that matched, openfda_count_values aggregates server-side in one request. Requires CANVAS_PROVIDER_TYPE=duckdb."New value: +"Also stage the matched set on a DataCanvas for SQL: openfda_dataframe_describe lists its columns, then openfda_dataframe_query runs the SQL. Staging is bounded (staged_rows says how many rows landed); for a distribution over the whole match, use openfda_count_values."
changedOutput schema / properties / canvas_id / description
Previous value: -"DataCanvas session id for the staged result set. Present when this call staged. Pass to openfda_dataframe_query / openfda_dataframe_describe, or back into this tool to accumulate more tables on the same canvas."New value: +"Canvas id of the staged set: pass to openfda_dataframe_describe, openfda_dataframe_query, or a later staged search."
changedOutput schema / properties / canvas_table / description
Previous value: -"Canvas table holding the staged rows. Present when rows were staged; list its columns with openfda_dataframe_describe, then reference it in openfda_dataframe_query FROM clauses."New value: +"Staged table name: openfda_dataframe_describe lists its columns, then use it in openfda_dataframe_query."
changedOutput schema / properties / error / properties / data / properties / reason / description
Previous value: -"Machine-readable failure mode. Declared by this tool: `limit_above_cap`: limit exceeds the cap of the endpoint this call selects, on a deployment that rejects rather than clamps it. `canvas_disabled`: Staging was requested (stage=true or a canvas_id) but DataCanvas is disabled. `canvas_not_found`: The canvas_id is well-formed but names no active canvas — expired or never minted. `canvas_capacity_exhausted`: canvas_id was omitted and the active canvas cap is already reached. `rate_limited`: The openFDA daily or per-minute request limit is exceeded. `upstream_error`: The openFDA API returned a 5xx server error. `malformed_search`: The search query leaves a double quote, parenthesis, or range bracket unclosed, or ends on a backslash. `query_error`: The search query was rejected by openFDA (malformed field name, invalid syntax). `pagination_limit_reached`: skip exceeds the 25000 record pagination ceiling. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `limit_above_cap`: limit exceeds the cap of the endpoint this call selects, on a deployment that rejects rather than clamps it. `canvas_disabled`: Staging was requested (stage=true or a canvas_id) but DataCanvas is disabled. `canvas_not_found`: The canvas_id is well-formed but names no active canvas — expired or never minted. `canvas_capacity_exhausted`: canvas_id was omitted and the active canvas cap is already reached. `rate_limited`: The openFDA daily or per-minute request limit is exceeded. `upstream_error`: The openFDA API returned a 5xx server error. `malformed_search`: search leaves a double quote, parenthesis, or range bracket unclosed, ends on a backslash, or holds a character openFDA refuses. `query_error`: The search query was rejected by openFDA (malformed field name, invalid syntax). `pagination_limit_reached`: skip exceeds the 25000 record pagination ceiling. `invalid_cursor`: cursor does not decode, belongs to another endpoint, search, or sort, or comes with skip above 0, stage, or canvas_id. Other values are possible when a failure originates below the handler."
changedOutput schema / properties / error / properties / data / properties / reason / examples
Previous value: -[
- "limit_above_cap",
- "canvas_disabled",
- "canvas_not_found",
- "canvas_capacity_exhausted",
- "rate_limited",
- "upstream_error",
- "malformed_search",
- "query_error",
- "pagination_limit_reached"
-]New value: +[
+ "limit_above_cap",
+ "canvas_disabled",
+ "canvas_not_found",
+ "canvas_capacity_exhausted",
+ "rate_limited",
+ "upstream_error",
+ "malformed_search",
+ "query_error",
+ "pagination_limit_reached",
+ "invalid_cursor"
+]
changedOutput schema / properties / meta / properties / limit / description
Previous value: -"Page size applied to this request: the requested limit, the endpoint default when limit was omitted, or the endpoint cap when limit exceeded it (the notice then says so). A window running past the end of the matched set returns fewer records than this, so read the length of results for the actual count."New value: +"Page size applied: limit, the endpoint default, or the cap when limit exceeded it. The last page of a match holds fewer records."
changedOutput schema / properties / meta / properties / total / description
Previous value: -"Total matching records in the database"New value: +"Total matching records"
changedOutput schema / properties / meta / properties / totalUnverified / description
Previous value: -"Present (true) only on an empty page at skip > 0 whose total could not be confirmed: openFDA answers a page past the end and a search that matched nothing alike, and the follow-up request for the total failed. total then reads 0 without ruling out records at a lower skip — re-call with skip=0 to tell."New value: +"True on an empty page at skip > 0 whose total could not be confirmed: total 0 then does not rule out records — re-call with skip=0."
addedOutput schema / properties / next_cursor
Added value: +{
+ "description": "Pass as cursor for the next page; present on a page read at skip 0 or by cursor when more records follow.",
+ "type": "string"
+}
changedOutput schema / properties / notice / description
Previous value: -"Canvas staging disclosure when the call staged, the limit clamp when limit exceeded the category's cap (requested value, cap, next skip), the fields projection and any requested path no record carries, the size and largest fields when a report on the page exceeds 24000 bytes, and guidance when results are empty or paging overshot — how to broaden filters or adjust the query."New value: +"Guidance for this page: empty result, limit clamp, end of a cursor walk, fields projection, oversized record, staging, paths left out by default, SQL for AND-ed clauses on one array entry. Absent when nothing needs saying."
addedOutput schema / properties / omitted_fields
Added value: +{
+ "description": "Paths left out of each record by default and their bytes on this page; name one in include to return it.",
+ "items": {
+ "additionalProperties": false,
+ "description": "A left-out path and its bytes.",
+ "properties": {
+ "bytes": {
+ "description": "UTF-8 bytes left out under the path on this page.",
+ "type": "number"
+ },
+ "path": {
+ "description": "Dotted path; array elements share one path.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "path",
+ "bytes"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+}
changedOutput schema / properties / page_bytes / description
Previous value: -"Serialized size of results in this response, in UTF-8 bytes. Present only when a record on the page serializes above 24000 bytes on its own — page_largest_fields then names the largest record's biggest fields, and fields projects each record to the paths you need."New value: +"UTF-8 size of results; present only when a record exceeds 24000 bytes, with page_largest_fields."
changedOutput schema / properties / page_largest_fields / description
Previous value: -"Present with page_bytes: the biggest fields of the largest record on the page, largest first — the deepest single field that holds that record's excess over 24000 bytes, or else up to three top-level fields. Leave them out with a fields projection to shrink the records."New value: +"The largest record's biggest fields, largest first, beside page_bytes. Leave them out with fields."
changedOutput schema / properties / page_largest_fields / items / description
Previous value: -"One field of the largest record and its serialized size."New value: +"A field and its size."
changedOutput schema / properties / page_largest_fields / items / properties / bytes / description
Previous value: -"Serialized UTF-8 bytes the field holds, totalled across array elements."New value: +"UTF-8 bytes, summed across array elements."
changedOutput schema / properties / page_largest_fields / items / properties / path / description
Previous value: -"Dotted field path on the record. Fields of array elements share their array path, so patient.drug.openfda covers that block in every drug of the report."New value: +"Dotted path; array elements share one path (patient.drug.openfda covers every drug)."
changedOutput schema / properties / projected_fields / description
Previous value: -"The field paths each record in results was projected to, as requested — present only when the call passed fields. Every record also keeps its identity key; any other field is absent because the projection left it out, not because openFDA lacks it. Re-call without fields for whole records."New value: +"Paths each record was projected to, present only with fields; a field missing from a record was projected away, not absent upstream."
changedOutput schema / properties / results / description
Previous value: -"Adverse event records — fields vary by category (drug: patient/reactions/drugs, device: device details/event type, food: products/outcomes)"New value: +"Adverse event records — fields vary by category (drug: patient/reactions/drugs, device: device details/event type, food: products/outcomes, cosmetic: products/reactions/outcomes)"
changedOutput schema / properties / spilled / description
Previous value: -"True when this call staged its matched set on the canvas — use canvas_id with openfda_dataframe_describe for its columns, then openfda_dataframe_query for SQL. Absent when staging was not requested."New value: +"True when this call staged its matched set; see canvas_id."
changedOutput schema / properties / staged_rows / description
Previous value: -"Rows written to the canvas table. Compare with meta.total: a smaller value means staging stopped at its size budget or openFDA's 25000-row pagination ceiling, and the table holds only the first staged_rows records."New value: +"Rows written to the canvas table; below meta.total, the table holds only the first staged_rows records."
changedOutput schema / properties / truncated / description
Previous value: -"True when fewer rows reached the canvas than matched upstream — staging stopped at its size budget or openFDA's 25000-row pagination ceiling. Narrow the query (filters, date range) for a complete set."New value: +"True when staging stopped short of meta.total (size budget or the 25000-row ceiling); narrow the search for the whole set."