Tools

Product feed tools with an API and regex rules

Two features separate a feed tool from a spreadsheet: it can talk to other systems without a person in the loop, and it can fix data with patterns instead of hand edits. 'API' hides three different things, though, and 'regex rules' ranges from a find box to a full expression language. This page sorts out both, with copyable regex and DSL examples, and is specific about which parts Textfinity has and which it does not.

We connect your store, build the feed and keep it in sync. Updated 2026-10-27.

At a glance

  • 'API' in a feed tool means one of three things: reading your catalog from an endpoint, pushing to a channel's API, or a programmatic interface your own code or assistant drives.
  • Textfinity reads CSV and Google Shopping-format XML endpoints (HTTPS or SFTP) and Google Sheets, and publishes feed URLs that channels, Google Merchant Center and Meta included, fetch on a schedule. It has no REST API; its programmatic surface is an MCP server, available to clients, that an AI assistant such as Claude connects to.
  • Regex rules in Textfinity: remove from regexp, replace from regexp, matches regexp and is in list (regexp) as filter operators, plus a conditional DSL for everything patterns cannot express.
  • Every example below is a rule we set up in Textfinity mappings and filters, and the patterns work in any regex-capable tool.

What 'API' means in product feed management

Source API: the tool pulls your catalog from an endpoint instead of a file. Textfinity reads a CSV or TSV, or XML in Google Shopping's RSS or Atom shape, from an HTTPS or SFTP URL, so a platform's CSV export endpoint, a PIM's Google feed or a custom script's CSV output all work as a shop source, alongside the native Shopify connection and Google Sheets. It does not read JSON: a JSON API response has to be flattened to a CSV (one row per variant) first, and a JSON URL gets a prompt to export CSV instead. A merged source joins a second file or sheet onto the catalog by key to add columns the main export lacks.

Channel API: the tool delivers through the channel's own interface rather than a file. Textfinity does not push through channel APIs: Google Merchant Center and Meta Commerce Manager fetch the published feed URL on a schedule, and we add that URL to the merchant's account with them. TikTok, Pinterest, Microsoft, Snapchat and custom feeds for channels such as Idealo fetch the feed URL the same way; Amazon and eBay files are downloaded and uploaded by the merchant.

Programmatic control: something other than a person drives the tool, creating feeds, changing rules, reading output. This is what developers usually mean by 'feed management with API', and it is the one to be explicit about: Textfinity has no REST API. What it has is an MCP server, available to clients: an AI assistant that speaks MCP, such as Claude, connects with an API token or OAuth, and the assistant can list organizations, shops and feeds, search products, create a feed, add, update or delete mapping rules, add filter rules, run feed hygiene and read a feed's output. Around that, the input side is any URL or sheet your systems write to and the output side is a stable feed URL any system can fetch. If a deployment pipeline must call HTTP endpoints directly, Textfinity is not that tool today.

What regex rules in a feed tool should do

Four capabilities cover almost every cleanup. Remove: delete everything a pattern matches, such as HTML tags or trailing SKU codes. Replace: rewrite matches, with capture groups, such as normalizing units or reordering words. Match as a condition: include or exclude products whose value fits a pattern, or apply a mapping rule only when it does. Match against a list of patterns: one rule, many brands or category codes. Textfinity implements these as the remove from regexp and replace from regexp transforms, the matches regexp and does not match regexp filter operators, is in list (regexp) and is not in list (regexp), and a matches regexp condition on any mapping rule. The mapping condition is anchored at the start of the value (begin the pattern with .* to match mid-value); the filter operator is not.

What regex cannot do well is logic across columns: 'if stock is zero write out of stock, else in stock' or 'brand plus title plus size unless size is empty'. That is the job of the advanced DSL, which references attributes in brackets, concatenates with +, and supports nested if/then/else with string tests (equals, not equals, includes, is empty), numeric comparisons on calc{} values, AND, OR and parentheses, plus calc{} arithmetic, round(), and now(), date(), time() and isoformat() for date fields.

Regex product feed examples

Each line is a remove from regexp or replace from regexp transform on one column. Patterns are standard; test on a sample before applying to 5,000 rows.

Copyable regex rules

strip HTML from description      remove:  <[^>]+>
collapse whitespace              replace: \s{2,}            -> " "
drop trailing SKU in title       remove:  \s*\(?[A-Z]{2,}-\d{3,}\)?$
normalize 'cm' spacing           replace: (\d+)\s*cm         -> "\1 cm"
extract size from title          replace: ^.*\b(XS|S|M|L|XL)\b.*$ -> "\1"
fix double currency              replace: ^(\d+\.\d{2}) (EUR|USD) \2$ -> "\1 \2"
filter: valid GTIN only          include if [gtin] matches regexp ^\d{8}(\d{4,6})?$
filter: brand list by pattern    include if [brand] is in list (regexp) ^(Nike|Adidas|Puma)$

DSL examples where regex runs out

The advanced transform is where cross-column logic lives. These are expressions for the advanced transform on a column.

Advanced DSL

availability:
  if calc{[stock]} > 0 then "in_stock" else "out_of_stock"

title with optional size:
  if [size] is empty then [brand] + " " + [title]
  else [brand] + " " + [title] + ", " + [size]

custom_label_0 by sale flag and margin band:
  if [price] is empty then ""
  else if [is_sale] equals "true" then "sale"
  else if [margin_band] equals "high" then "hero" else "standard"

sale_price_effective_date (end column carries its time):
  isoformat([sale_start]) + "/" + isoformat([sale_end])

Choosing a feed tool when the API question is real

Be honest about which API you need. If the answer is 'my platform has an export endpoint and the channel needs a file on a URL', almost any feed tool qualifies and the regex and rule depth is what to compare; Textfinity covers that with EU hosting, set up for you and quoted per catalog. If the answer is 'my deployment pipeline must create and rebuild feeds programmatically', ask vendors for a REST API reference before the demo; Textfinity has none. If the answer is 'I want to set up and change feeds by asking an assistant', Textfinity's MCP server, available to clients, covers feed creation, mapping and filter rules, hygiene runs and reading output.

Then test the rules on your ugliest data. A tool that offers regex but no capture groups, or conditions but no else branch, will push you back to spreadsheets within a month. Run the examples above on a 100-product sample before you commit; on Textfinity we run them on your own catalog during setup, and feed hygiene tells you whether the cleanups actually cleaned.

Examples

Worked examples, by situation

Three catalogs, three kinds of mess, each fixed with the regex or DSL rule shown.

PIM CSV export on SFTP · Google Shopping · 6,000 SKUs · Germany · furniture

PIM export in, HTML stripped from descriptions

Before

description: "<p>Eiche massiv, <b>180 cm</b> breit</p>"

After

description: "Eiche massiv, 180 cm breit"

How we set it up

The PIM writes a nightly CSV export to an SFTP server; we read it by its sftp:// address and map description with remove from regexp <[^>]+>. Each output column takes one transform, so a second cleanup such as unit spacing goes on a different column or into the pattern itself.

Shopify · Meta catalog · 900 products · US · sporting goods

Trailing SKU code removed from titles

Before

title: "Trail Running Pack 12L (TRP-00412)"

After

title: "Trail Running Pack 12L"

How we set it up

We map title with remove from regexp \s*\([A-Z]{2,}-\d{3,}\)$ on product.title. The $ anchor keeps model numbers mid-title intact. The feed URL is added to the Meta catalog in Commerce Manager as a scheduled data source.

CSV export + supplier sheet · Idealo (custom feed) + Google Shopping · 2,400 SKUs · Netherlands · electronics

Valid GTINs only, merged from a supplier sheet

Before

gtin column 40% empty; supplier sheet has EANs keyed by article number, some with spaces

After

gtin filled from the sheet, spaces removed, rows with invalid GTINs excluded

How we set it up

We join the supplier sheet as a merged source on article_number and map gtin with replace from regexp \s → "" on the merged ean column. Filters read the source columns, not the mapped output, so the GTIN filter runs on the merged ean column with a pattern that tolerates the spaces: include only if [ean] matches regexp ^(\d\s*){8}((\d\s*){4,6})?$.

Copy this plan

Wire a programmatic source to a channel without code

Five steps from an endpoint your systems already produce to a feed the channel fetches; we do the Textfinity side with you.

  1. 01

    Expose the catalog as a URL

    A CSV or Google Shopping-format XML endpoint your platform or PIM already serves, a CSV your scripts drop on an SFTP server, or a Google Sheet they write to. JSON has to be flattened to CSV first. Authentication must be in the URL or absent; Textfinity fetches it on the shop schedule.

    What we set up: We add your CSV or XML URL, SFTP address or Google Sheet as the shop source.
  2. 02

    Join extra data by key

    Supplier GTINs, margins or category codes from a second endpoint or sheet become columns on the catalog.

    What we set up: We add the second file or sheet as a merged source on the key column you name.
  3. 03

    Create the channel feed and write the regex cleanups

    Start from the channel template, then apply remove and replace from regexp on the text columns and matches regexp filters on identifiers.

    What we set up: We create the feed from the channel template, write the replace from regexp cleanups, and add matches regexp filters on identifiers.
  4. 04

    Express cross-column logic in the DSL

    Availability from stock, optional title parts, custom labels from bands.

    What we set up: We write the cross-column rules as advanced DSL expressions and check them per product in the product explorer.
  5. 05

    Profile and publish

    Feed hygiene reports what the rules changed in aggregate: fill rates, lengths, outliers, URL validity. Then hand the feed URL to the channel as a scheduled source.

    What we set up: We run feed hygiene, publish, and add the URL in Merchant Center, Commerce Manager or the channel's console with you.

Customization tips

Make it yours

Anchor your patterns

^ and $ stop a SKU-stripping regex from eating a model number mid-title. The trade-off is a few unmatched edge cases you will see in the product explorer.

Prefer a list (regexp) filter over many rules

One is in list (regexp) rule with anchored brand patterns is easier to audit than ten equality rules, but it also hides a typo in one pattern among the others.

Keep lookups in a sheet, logic in the DSL

Category and brand maps belong in a Google Sheet lookup; conditional logic belongs in advanced expressions. Mixing them makes rules unreadable within a month.

Expect MCP, not a REST API, from Textfinity

The input and output are URLs, which most pipelines can produce and consume, and feed setup can be driven by an AI assistant over MCP. If your code must call REST endpoints to create feeds, choose a tool that publishes an API reference.

FAQ

Questions about product feed management with api

Does Textfinity have an API?

Not a REST API. Textfinity runs an MCP server that clients can use: an AI assistant that speaks MCP, such as Claude, connects with an API token or OAuth and can list shops and feeds, search products, create a feed, add mapping and filter rules, run feed hygiene and read a feed's output. Otherwise it reads catalogs from CSV, Google Shopping-format XML or Google Sheet URLs and publishes feeds on stable URLs that Google Merchant Center, Meta and other channels fetch on a schedule.

Can a feed tool read product data from an API endpoint?

Yes, if the endpoint returns a file the tool can parse. Textfinity fetches a CSV or Google Shopping-format XML URL (HTTPS or SFTP) on the shop's schedule; a JSON response needs flattening to CSV first. The source is then treated like any other, with merged sources for joining a second endpoint or sheet by key.

What regex operations should a product feed tool support?

Remove by pattern, replace with capture groups, match as a filter condition, and match against a list of patterns. Textfinity has remove from regexp, replace from regexp, matches regexp, does not match regexp, is in list (regexp) and is not in list (regexp).

How do I strip HTML from product descriptions in a feed?

Use a remove-from-regexp transform on the description column with the pattern <[^>]+>. A column takes one transform, so to also tidy the spaces the tags leave behind, use replace from regexp (?:\s*<[^>]+>\s*)+ with a single space instead; the result is trimmed at both ends.

When do I need a DSL instead of regex?

When the output depends on more than one column or on a condition: availability from stock, a title that includes size only when present, a custom label from a price band. Textfinity's advanced transform handles these with if/then/else and attribute references.

Set up for you

Have these regex rules applied to your own catalog.

Send us your CSV or Google-format XML endpoint. We set up the cleanups above in Textfinity and publish a feed URL for Google, Meta or any channel, rebuilt on schedule.

Have us set up your rulesOr email support@textfinity.io

Tell us your store and channels. We reply within 24 hours.