# Clay

A market feed as a Clay source: one flat row per company, with the market's reasons in a column.

A market feed is a flat table. Rows carry a `company_` prefix on registry facts, and one row is one company.

## The quick way: the CSV

Download the market and import it. Column headers are written for a person, so Clay's importer names the columns correctly with no mapping step:

```bash
curl -sS -o market.csv 'https://prospex.ch/app/markets/feed/<token>.csv'
```

Good for a one-off list to work through. It is a snapshot, so a rebuilt market means a fresh download.

## The live way: the JSON URL as an HTTP source

Add an HTTP API source in Clay and give it the JSON URL from the market's Connect page. Three settings matter:

| Setting | Value |
| --- | --- |
| URL | https://prospex.ch/app/markets/feed/\<token>.json?limit=500 |
| Where the rows are | `data`, an array of objects. |
| Next page | `next_url`, absolute and complete. Empty means you are done. |

Treat the URL as a secret in Clay the way you would a key, and rotate it from the Connect page if a table gets shared further than you meant.

## The columns worth mapping

| Field | What it gives a Clay table |
| --- | --- |
| company_domain | The join key for every Clay enrichment that takes a domain. |
| company_uid | The Swiss identifier, for writing back into a CRM without a name match. |
| fit | A sortable word. Filter the table on it before you spend credits on enrichment. |
| reasons | Why the company is in the market, in the market's own words. Usable in a message. |
| missing | Which facts Prospex does not hold, so Clay only enriches where there is a gap. |
| in_crm | Whether your connected CRM already has the company. Filter it out and stop paying to enrich accounts you own. |

`reasons`, `missing` and `signals` are arrays in the JSON. In the CSV the same values arrive joined into one cell.

## Budget

Every row Clay pulls counts against your daily row allowance. A table that re-imports on every run can exhaust the day's allowance. Import once, then re-import when the market rebuilds. [Limits](https://prospex.ch/docs/limits/) has the numbers, and each JSON page carries a `usage` block with your position in the day.
