{"id":23169104,"url":"https://github.com/proprietary/stlouisfed-fred-web-proxy","last_synced_at":"2025-10-19T00:11:22.424Z","repository":{"id":195496892,"uuid":"693026588","full_name":"proprietary/stlouisfed-fred-web-proxy","owner":"proprietary","description":"Proxies web requests to FRED without CORS such that it may be used in a web app","archived":false,"fork":false,"pushed_at":"2023-09-19T14:03:28.000Z","size":95,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-26T16:46:05.569Z","etag":null,"topics":["economics","federal-reserve","finance","quantitative-finance"],"latest_commit_sha":null,"homepage":"https://fred.libhack.so","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/proprietary.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-18T07:44:04.000Z","updated_at":"2023-09-19T14:29:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"fee566fb-6fda-4f2d-9b52-d4f185700981","html_url":"https://github.com/proprietary/stlouisfed-fred-web-proxy","commit_stats":null,"previous_names":["proprietary/stlouisfed-fred-web-proxy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/proprietary/stlouisfed-fred-web-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proprietary%2Fstlouisfed-fred-web-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proprietary%2Fstlouisfed-fred-web-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proprietary%2Fstlouisfed-fred-web-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proprietary%2Fstlouisfed-fred-web-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/proprietary","download_url":"https://codeload.github.com/proprietary/stlouisfed-fred-web-proxy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proprietary%2Fstlouisfed-fred-web-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279650828,"owners_count":26205540,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-18T02:00:06.492Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["economics","federal-reserve","finance","quantitative-finance"],"created_at":"2024-12-18T03:15:22.779Z","updated_at":"2025-10-19T00:11:22.407Z","avatar_url":"https://github.com/proprietary.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FRED web proxy\n\nThis is a web server that proxies requests from [St Louis Fed's FRED](https://fred.stlouisfed.org/) (a great resource for free, public domain economics data) with permissive CORS so that web applications can consume it directly.\n\n## Problem this solves\n\nYou may have tried to integrate FRED data in your web app frontend. But fetching the FRED API at `https://api.stlouisfed.org/...` from your frontend does not work. This is because (1) FRED does not allow your website's domain in their `Access-Control-Allow-Origin`, and (2) were you to send requests to the FRED API from your frontend, it would be insecure because you would necessarily leak your API key to clients. The obvious solution is to introduce some server-side code that glues together FRED and your client-side application; that's what this is.\n\nThis is quick, easy-to-deploy proxy that glues the FRED API to something that your frontend can use.\n\nAlso, this may be deployed as a service for anyone on the web to use. If your app is fully client-side, and you need it to consume FRED data, then a public instance of this proxy would solve your problem. \n\n## Live Demo\n\nThis API is live at `https://fred.libhack.so/`. It is free and open to use right now.\n\nExample:\n\n```bash\n# Get 2 specific days of the S\u0026P500 series\n% curl 'https://fred.libhack.so/v0/observations?series_id=SP500\u0026observation_start=2023-09-14\u0026observation_end=2023-09-15'\n[{\"date\":\"2023-09-14\",\"value\":\"4505.1\"},{\"date\":\"2023-09-15\",\"value\":\"4450.32\"}]\n```\n\n## API\n\n### `/v0/observations`\n\nThis endpoint corresponds to the similar `observations` endpoint, as you can learn more about on [official FRED docs](https://fred.stlouisfed.org/docs/api/fred/series_observations.html). `series_id` can be most easily found by finding a FRED page and looking at the end of the URL. For example, the `series_id` of `https://fred.stlouisfed.org/series/WLODLL` is `WLODLL`.\n\nAvailable parameters (as query string parameters):\n- `series_id`\n- `observation_start`\n- `observation_end`\n\nReturns an array of dates and values in JSON format.\n\n### `/v0/series`\n\nThis is metadata about an economic series. It forwards the result from FRED's `series` endpoint ([official FRED docs](https://fred.stlouisfed.org/docs/api/fred/series.html)).\n\nAvailable parameters (as query string parameters):\n- `series_id`\n\n\n## Usage\n\nThe following instructions are relevant if you want to run this service yourself.\n\n### Installation\n\nPrerequisites:\n- Install the [Rust toolchain](https://rustup.rs/)\n- Create a [free API key](https://fred.stlouisfed.org/docs/api/api_key.html) on FRED\n\n```bash\n$ git clone https://github.com/proprietary/stlouisfed-fred-web-proxy.git\n$ cd stlouisfed-fred-web-proxy\n$ cargo build --release\n```\n\n### Running\n\nExample:\n\n```bash\n$ ./target/release/stlouisfed-fred-web-proxy \\\n  --sqlite-db cache.db \\\n  --fred-api-key \u003cyour-api-key\u003e\n$ # You may also set these configuration variables through environment variables like so:\n$ # export FRED_OBSERVATIONS_DB=\u003cpath to a file which caches data locally\u003e\n$ # export FRED_API_KEY=\u003cyour api key\u003e\n\n```\n\n```bash\n$ curl -s 'http://localhost:9001/v0/observation?series_id=SP500\u0026observation_start=2023-01-01\u0026observation_end=2023-03-01'\n```\n\n## Open source\n\nThis software is provided \"as is\", without warranty of any kind.\n\nThis software retrieves and stores data from St. Louis Fed's FRED economics data service. All the data from FRED is in the public domain and therefore free to store, retrieve and redistribute.\n\n## License\n\nApache-2.0","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproprietary%2Fstlouisfed-fred-web-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fproprietary%2Fstlouisfed-fred-web-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproprietary%2Fstlouisfed-fred-web-proxy/lists"}