IMPORTFEED function

IMPORTFEED imports items from RSS and Atom feeds into a spreadsheet, parsing structured feed data into rows and columns.

=IMPORTFEED(url, [query], [headers], [num_items])

Generate a IMPORTFEED formula

Describe what you need. The generator will reach for IMPORTFEED where IMPORTFEED is the right tool, and tell you when it is not.

How to get a better answer
  • Name your columns by letter and by header: "column F (Net Value)" beats "the amount column".
  • State every condition, including the negatives — "not cancelled" changes the formula's shape.
  • Say where the data starts if it is not row 1, and whether it will grow.
  • Check the settings above match your spreadsheet: the wrong argument separator is a syntax error on your machine.

Arguments

How IMPORTFEED reads its arguments
urlrequiredqueryoptionalheadersoptionalnum_itemsoptionalIMPORTFEED
ArgumentRequiredDescription
urlRequiredThe feed URL (HTTP/HTTPS); required. If the domain doesn't serve a valid RSS/Atom feed or is unreachable, returns #N/A.
queryOptionalOptional XPath-like query string to filter feed items (e.g., //item[contains(description, 'text')]); invalid syntax returns #VALUE!.
headersOptionalOptional boolean (TRUE/FALSE) indicating whether to include column headers in the output; defaults to FALSE if omitted.
num_itemsOptionalOptional maximum count of feed items to import, ordered by publication date descending; must be 1–10000, else returns #NUM!.

Returns

Array of rows from the specified feed, with each row containing feed item fields like title, description, and pub date.

Availability

Excel: Not available · Google Sheets: Supported

Worked examples

1. Import warehouse inventory feed

TitleDescriptionpubDate
SKU: W-4521 | ChicagoOn hand: 47, Reorder: 50, Cost: $12.452026-09-15T08:30:00Z
SKU: W-4521 | DetroitOn hand: 23, Reorder: 50, Cost: $12.452026-09-15T08:15:00Z
SKU: W-8847 | ChicagoOn hand: 156, Reorder: 100, Cost: $8.992026-09-14T22:45:00Z
=IMPORTFEED("https://warehouse.retailco.com/stock-feed.xml")

Result: 3 rows of warehouse inventory updates from the feed

IMPORTFEED parses the feed's XML and extracts each item as a row. The warehouse inventory feed embeds SKU, location, on-hand quantity, reorder point, and cost in the item title and description. Each warehouse location appears as a separate feed entry, most recent first.

2. Import only Chicago warehouse inventory with headers

TitleDescriptionpubDate
SKU: W-4521 | ChicagoOn hand: 47, Reorder: 50, Cost: $12.452026-09-15T08:30:00Z
SKU: W-8847 | ChicagoOn hand: 156, Reorder: 100, Cost: $8.992026-09-14T22:45:00Z
=IMPORTFEED("https://warehouse.retailco.com/stock-feed.xml", "//item[contains(description, 'Chicago')]", TRUE, 10)

Result: 2 rows, filtered to Chicago warehouse entries only, with column headers

The query parameter filters feed items to only those containing 'Chicago' in the description field. headers=TRUE includes a header row naming each column. num_items=10 limits results to the 10 most recent matching entries; since only 2 exist, all are returned.

3. Get the 5 most recent inventory updates

SKU: W-4521 | ChicagoOn hand: 47, Reorder: 50, Cost: $12.452026-09-15T08:30:00Z
SKU: W-4521 | DetroitOn hand: 23, Reorder: 50, Cost: $12.452026-09-15T08:15:00Z
SKU: W-8847 | ChicagoOn hand: 156, Reorder: 100, Cost: $8.992026-09-14T22:45:00Z
SKU: W-2310 | BostonOn hand: 89, Reorder: 75, Cost: $15.302026-09-14T20:00:00Z
SKU: W-4521 | BostonOn hand: 34, Reorder: 50, Cost: $12.452026-09-14T18:45:00Z
=IMPORTFEED("https://warehouse.retailco.com/stock-feed.xml", , FALSE, 5)

Result: 5 rows of the newest feed entries, spanning all warehouses

num_items=5 limits output to the 5 most recent items from the feed. The query parameter is omitted (no filtering), and headers=FALSE means column names are excluded. This snapshot captures the latest inventory changes across all warehouse locations without need for post-processing.

Common errors

Which IMPORTFEED error are you seeing?
IMPORTFEED returned an error#N/A
Verify the feed URL is correct and test it in a browser or feed reader; confirm your Google Sheets account has permission to access external URLs via security settings.
#VALUE!
Simplify the query using basic XPath predicates like //item[contains(title, 'text')] or remove the query parameter entirely; consult your feed's documentation for available field names.
#NUM!
Use a positive integer between 1 and 10000, or omit num_items to retrieve all available items up to the feed's natural limit.
ErrorWhy it happensHow to fix it
#N/AThe URL does not point to a valid RSS/Atom feed, the domain is unreachable, or the connection is blocked.Verify the feed URL is correct and test it in a browser or feed reader; confirm your Google Sheets account has permission to access external URLs via security settings.
#VALUE!The query parameter contains invalid XPath syntax, references a nonexistent feed field, or uses unsupported operators.Simplify the query using basic XPath predicates like //item[contains(title, 'text')] or remove the query parameter entirely; consult your feed's documentation for available field names.
#NUM!The num_items argument is 0, negative, or exceeds 10000 items (the maximum allowed).Use a positive integer between 1 and 10000, or omit num_items to retrieve all available items up to the feed's natural limit.

Tips and when to use something else

  • IMPORTFEED retrieves feed items but does not parse embedded data—use REGEXMATCH or QUERY on the results to extract specific values (e.g., cost or reorder point) from title and description fields.
  • For feeds requiring authentication, non-standard formats, or more control over parsing, consider IMPORTXML or IMPORTHTML as alternatives.
  • Feed results cache for ~1 hour; to force a refresh immediately, press Ctrl+Shift+F9 (⌘+Shift+F9 on Mac) or wrap the URL with NOW() to trigger recalculation.
  • Pair IMPORTFEED with ARRAYFORMULA to automatically refresh downstream calculations (like low-stock alerts) whenever the feed updates.

Frequently asked questions

How often does IMPORTFEED refresh the data?
Google Sheets caches IMPORTFEED results for approximately 1 hour. To force an immediate refresh, press Ctrl+Shift+F9 (⌘+Shift+F9 on Mac), or modify the formula to include a volatile function like =IMPORTFEED(url&"?t="&NOW()).
Can I import from password-protected or private feeds?
IMPORTFEED cannot directly authenticate to private feeds. If a feed requires login, you'll need to use a public feed export, an intermediary API service that republishes it, or contact your administrator about cross-domain access policies for your domain.
What feed formats does IMPORTFEED support?
IMPORTFEED supports RSS 2.0 and Atom feeds only. The feed must be valid XML and publicly accessible. For JSON APIs, CSV exports, or custom formats, use IMPORTDATA or a third-party API wrapper instead.
Why is my formula returning fewer rows than I expected?
Check whether the query parameter is filtering out results, or if num_items is set lower than the total feed size. Also verify the feed itself contains recent items—some feeds retain only the last 20–50 entries. Try =IMPORTFEED(url,,FALSE) with no query or limit to see all available items.

Need a different formula?

The full generator is not scoped to one function — describe any spreadsheet problem and it will pick.

Open the formula generator

Reviewed 2026-09-17