@graphysdk/core. 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' }).Fetch timeout in milliseconds. The request is aborted if it takes longer.
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.Sheet to parse (spreadsheets only). Pass a sheet name or 0-based index.
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.
Maximum number of data rows to process (spreadsheets only).
Maximum total cells to process (spreadsheets only).
Supported Extensions
| Extension | Format |
|---|---|
.csv | CSV |
.tsv, .tab | TSV |
.xlsx | XLSX |
.xls | XLS |
.ods | ODS |
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.
