{ columns, rows } Data structure used by Graphy agents and chart configs. The format is auto-detected from the URL path extension.
fromURL
Signature
Options
URL to fetch. The path extension determines the format, falling back to the
response
Content-Type header.Custom headers to include in the fetch request. Useful for authenticated
endpoints (e.g.
{ Authorization: 'Bearer token' }).Optional external abort signal for cancellation. Combined with the internal
timeout signal via
AbortSignal.any.Whether the first row contains column headers (CSV/TSV only). When
false,
columns are auto-named Column 1, Column 2, etc.Locale for number parsing. Determines thousand/decimal separator conventions.
Maximum allowed input size in megabytes. The response body is streamed with a
byte budget — the download is aborted early if the limit is exceeded.
Supported Extensions
Unsupported extensions throw an error listing the supported formats.
Examples
With the AI SDK
Error Handling
With Custom Headers
With Timeout and Cancellation
fromURL uses the global fetch API and works in Node.js 18+ and all modern
browsers. For authenticated endpoints, you can either pass headers in the
options or fetch the data yourself and use the format-specific parsers
(fromCSV, fromXLSX, etc.) directly.
