SNB Swiss Rates Scraper
parseforge/snb-swiss-rates-scraper
AutomationIntegrations
Scrapes Swiss National Bank interest rates, bond yields, and FX rates from four statistical cubes. Returns each observation as a flat row with date, value, and cube ID.
- Total users
- 2
- Monthly active
- 1
- Total runs
- 88
- Bookmarked
- 0
- Rating
- Not rated yet
- Last modified
- 9 days ago
Overview
SNB Swiss Rates Scraper
Scrape official Swiss National Bank interest rates, bond yields, and foreign exchange rates, up to a million data points per run. Every rate comes with its date, value, and cube identifier. No API key required. Export to CSV, JSON, Excel, or XML.
The Swiss National Bank publishes policy rates, bond yields, and daily or monthly FX rates on its data portal, but manual downloads are slow and hard to automate. This actor reads the SNB's public statistical cubes directly, filters by date range, and returns each observation in one fixed schema. It is built for analysts who need Swiss franc interest rate and exchange rate history without writing their own ETL.
| Who uses it | What they scrape Swiss National Bank for |
|---|---|
| Financial analysts | Pull the SNB policy rate history to model Swiss monetary policy decisions. |
| Forex traders | Download daily CHF exchange rates against major currencies for backtesting. |
| Economic researchers | Gather long-run Swiss government bond yields for yield curve analysis. |
| Data engineers | Feed a scheduled pipeline with the latest SNB rates without maintaining a custom connector. |
What it does
This actor collects Swiss National Bank rates from four statistical cubes and returns each observation as a flat row with date, value, and cube identifier.
- ๐ฆ Four statistical cubes: policy rate, bond yields, daily FX, and monthly FX from the SNB data portal.
- ๐ Date range filter: set a start and end date to pull only the observations you need.
- ๐ Flat row output: each rate is one row with the date, numeric value, and cube identifier.
- โ๏ธ Configurable volume: cap the maximum number of rates per run, from a single test row up to one million.
Results export to CSV, JSON, Excel, or XML, or straight from the API.
What you can do with Swiss National Bank data
๐ Track Swiss monetary policy.
A macro analyst pulls the SNB policy rate cube every quarter to update a chart of Swiss interest rate decisions since 2000.
๐ฑ Backtest CHF trading strategies.
A quant trader downloads daily CHF/EUR and CHF/USD rates for the last five years to run a carry-trade simulation.
๐ Model Swiss yield curves.
A PhD researcher collects Confederation bond yields across all available maturities to study term premia in safe-haven currencies.
๐ Automate a rates pipeline.
A data engineer schedules a weekly run of the monthly FX cube and appends the rows to a corporate data warehouse.
Why choose this scraper
| What you get | |
|---|---|
| Official source | Data comes directly from the Swiss National Bank's public statistical cubes, not a third party. |
| No API registration | Reads the same feeds the SNB portal uses; no application, no OAuth, no rate-limit headaches. |
| Fixed schema | Every run returns the same columns: date, value, and cube ID, ready for your model or dashboard. |
| Four cubes, one actor | Switch between policy rates, bond yields, daily FX, and monthly FX with one input field. |
How it compares
No other Store actor targets Swiss National Bank the same way, so the honest comparison is with the alternatives teams actually weigh.
| SNB Swiss Rates Scraper | Build it in-house | By hand | |
|---|---|---|---|
| Setup | Run it now, zero config | Days of engineering | None, but hours per pull |
| When Swiss National Bank changes | Maintained for you | You fix it | You re-learn the page |
| Proxies, retries, anti-bot | Built in | Your problem | Browser only |
| Output | Fixed JSON schema, CSV/Excel export | Whatever you build | Copy-paste |
| Cost | Pay per result | Engineering time | Analyst hours |
Configure the run
Drive the actor by selecting one of four SNB statistical cubes and an optional date range; filters run as each observation is read so only matching rates reach your dataset. The Input tab lists every parameter.
A first run with the defaults:
{
"maxItems": 10
}
A larger pull:
{
"maxItems": 200
}
Pricing
Pay-per-result: $0.0085 per result collected. You pay only for the results written to your dataset.
| Results collected | Approximate cost |
|---|---|
| 100 results | $0.85 |
| 1,000 results | $8.50 |
| 10,000 results | $85.00 |
New Apify accounts start with $5 in free credit.
Free users
Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.
Run it
- Create a free Apify account with $5 in credit.
- Open the SNB Swiss Rates Scraper.
- Set your inputs and any filters, then click Start.
- Export the results as CSV, Excel, JSON, or XML from the Dataset tab.
Run it programmatically through the Apify API (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.
Use with AI agents (MCP)
Give an AI agent live access to Swiss National Bank through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:
claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/snb-swiss-rates-scraper"
Then prompt it in plain language to run the scraper and read back the results.
Troubleshooting
Why am I getting no results?
Check your date range. If dateFrom is after the last available observation, or dateTo is before the first, the cube will return nothing. Try widening the range or removing the date filters.
The run returns fewer rows than my maxItems setting.
This is normal. The SNB cube only contains as many observations as exist for your selected date range. The actor stops when it runs out of data, not when it hits maxItems.
I see an error about the cube ID.
Make sure you selected one of the four listed cubes in the input. Typing a custom value that is not in the dropdown will cause the run to fail.
The date format is wrong in my output.
The actor returns dates as provided by the SNB feed. If you need a specific format, use a post-processing step in your pipeline or a simple formula in Excel after export.
Can I get intraday FX rates?
No. The SNB cubes this actor reads contain daily and monthly frequencies only. Intraday or tick data is not available through this source.
FAQ
| Question | Answer |
|---|---|
| Which rates can I scrape with this actor? | You can scrape the SNB policy rate, Swiss Confederation bond yields, daily foreign exchange rates, and monthly foreign exchange rates. Select the cube you want with the Cube ID input. |
| Do I need an API key from the Swiss National Bank? | No. The actor reads the same public data feeds that power the SNB data portal. No registration or API key is required. |
| How far back does the data go? | The start date depends on the cube. Policy rate data goes back decades, while daily FX typically starts later. Set a dateFrom to pull only the period you need. |
| What format does the output come in? | You can export your dataset to CSV, JSON, Excel, or XML from the Apify platform. Each row contains the date, the rate value, and the cube identifier. |
| Can I get both daily and monthly FX rates in one run? | No. Each run targets one cube at a time. To collect both daily and monthly FX, run the actor twice with different Cube ID selections. |
| What currencies are included in the FX cubes? | The SNB publishes rates for major currencies such as EUR, USD, GBP, and JPY, among others. The actor returns whatever the selected cube contains for your date range. |
| Is the data updated when the SNB publishes new rates? | Yes. The actor reads the live SNB data feed each time it runs, so you always get the latest published observation. |
| Can I limit how many rows the actor returns? | Yes. Set the Maximum rates input to cap the number of observations per run, from 1 up to 1,000,000. |
| Does this actor handle Swiss average mortgage rates? | No. The four available cubes cover the policy rate, bond yields, daily FX, and monthly FX. Mortgage rates are not included in these cubes. |
Related actors
Browse the full ParseForge collection for more scrapers.
๐ Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.
โ ๏ธ Disclaimer. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Swiss National Bank. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.
Input
| Field | Type | What it does | Default |
|---|---|---|---|
| cube | string (4 options) | SNB cube ID. | rendoblid |
| dateFrom | string | YYYY-MM-DD. | not set |
| dateTo | string | YYYY-MM-DD. | not set |
| maxItems | integer | Maximum number of exchange rates to collect per run. | 10 |
Pricing
from $7.50 per 1,000 results
| Charged for | What it is | Price each |
|---|---|---|
| result | Single result in the default dataset. | $0.0075 to $0.0085 |
Tiered: the lower figure is the price on a higher Apify plan. Billing and the free credit live on Apify.
API
One POST returns the dataset directly. Same shape for every scraper in the library, so swapping the slug is the only change.
curl -X POST "https://api.apify.com/v2/acts/parseforge~snb-swiss-rates-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"helloWorld": 123
}' Examples
Input that runs as-is.
{
"helloWorld": 123
} Reviews
No reviews yet. Be the first.
Issues
We build and maintain this scraper, so a problem with it comes to us. Report it on the Apify listing and the thread stays attached to the scraper where the next person can find it: open an issue.
Broken and urgent, or you would rather not post in public? Write to parseforge@protonmail.com and it reaches the people who wrote it.
