Fred Macro logo

Fred Macro

Community
gauss314
fred-macro

API gratuita de la Reserva Federal (FRED): 840K+ series macroeconómicas (GDP, CPI, tasas, empleo, M2, VIX, treasuries).

Overview

Publishergauss314
Repositoryskills
Skill namefred-macro
Stars
250
Forks
35
Bundled files
5
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by gauss314 on GitHub. Read the source before you install it.

Installation

Install the Fred Macro AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/gauss314/skills/tree/main/skills/fred-macro
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/gauss314/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/fred-macro .claude/skills/fred-macro
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Fred Macro in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Fred Macro on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Fred Macro is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

FRED Macro — Federal Reserve Economic Data API

API gratuita y oficial de la Reserva Federal de St. Louis (FRED) con 840,000+ series temporales macroeconómicas: PIB, inflación (CPI/PCE), tasas de interés, empleo, M2, VIX, treasuries, hipotecas y más.

Base URL: https://api.stlouisfed.org/fred Documentación oficial: fred.stlouisfed.org/docs/api/fred/


Autenticación

Obtener API Key (GRATIS)

  1. Ir a: https://fred.stlouisfed.org/docs/api/api_key.html
  2. Crear cuenta gratuita (email + contraseña)
  3. Solicitar API key (se genera instantáneamente)
  4. No requiere tarjeta de crédito

Usar la API Key

python
import os
API_KEY = os.getenv("FRED_API_KEY")  # Recomendado
# o directamente para pruebas:
# API_KEY = "TU_API_KEY_AQUI"

⚠️ NUNCA hardcodear la API key en código compartido/commits.


Rate Limits

LímiteValor
Requests por minuto120 req/min
Requests por díaIlimitado (sin límite diario explícito)
Máx observaciones por request100,000
Máx series por requestDepende del endpoint (generalmente 1)
CostoCompletamente GRATIS

Recomendaciones

  • Cachear respuestas localmente (los datos macroeconómicos cambian con poca frecuencia)
  • Usar observation_start y observation_end para limitar rangos
  • Implementar retry con backoff si se recibe HTTP 429 (Too Many Requests)
  • Para descargar muchas series, intercalar 0.5s entre requests

Endpoints Principales

Series y Observaciones

EndpointDescripciónAuth
GET /fred/series/observationsValores históricos de una serieAPI Key
GET /fred/series/searchBuscar series por textoAPI Key
GET /fred/seriesMetadatos de una serieAPI Key
GET /fred/series/categoriesCategorías de una serieAPI Key
GET /fred/series/releaseRelease asociado a una serieAPI Key

Categorías y Releases

EndpointDescripción
GET /fred/categoryInformación de una categoría
GET /fred/category/childrenSubcategorías
GET /fred/category/relatedCategorías relacionadas
GET /fred/category/seriesSeries en una categoría
GET /fred/releaseInformación de un release
GET /fred/release/datesFechas de un release
GET /fred/release/seriesSeries en un release

Tags (etiquetas)

EndpointDescripción
GET /fred/tagsBuscar tags
GET /fred/related_tagsTags relacionados
GET /fred/tags/seriesSeries con un tag específico
GET /fred/series/tagsTags de una serie

Fuentes (Sources)

EndpointDescripción
GET /fred/sourcesLista de fuentes de datos
GET /fred/sourceInformación de una fuente

Mapas de Calendario

EndpointDescripción
GET /fred/series/updatesSeries actualizadas recientemente
GET /fred/seasonal/adjustmentsOpciones de ajuste estacional

Formato de Respuesta

Por defecto devuelve XML. Se puede cambiar con &file_type=json:

json
{
  "realtime_start": "2026-06-01",
  "realtime_end": "2026-06-01",
  "observation_start": "1954-07-01",
  "observation_end": "2026-06-01",
  "units": "lin",
  "count": 864,
  "observations": [
    {
      "realtime_start": "2026-06-01",
      "realtime_end": "2026-06-01",
      "date": "1954-07-01",
      "value": "."
    },
    {
      "realtime_start": "2026-06-01",
      "realtime_end": "2026-06-01",
      "date": "1954-10-01",
      "value": "126.8"
    }
  ]
}

Nota: valores "." indican dato no disponible (N/A).


Categorías de Series

Las series FRED están organizadas en categorías (ids numéricos):

IDCategoríaEjemplos
0Todas las categorías (raíz)—
32991Population, Employment, & Labor MarketsUNRATE, PAYEMS, NFP
32992National Income & Product AccountsGDP, GDPC1, GNP
32993Consumer Price Indexes (CPI)CPIAUCSL, CPILFESL
32994Producer Price Indexes (PPI)PPIACO, PPIFIS
32995Interest RatesFEDFUNDS, DGS10, DGS2
32996Money, Banking, & FinanceM2SL, M1SL, TOTBKCR
32997International TradeBOPGSTB
33000U.S. Regional DataEstadísticas estatales
33001Academic DataDatos académicos

Ver referencia completa en references/SERIES_REFERENCE.md.


Uso Rápido

1. Descargar una serie (Python)

python
import requests

API_KEY = "TU_API_KEY"
url = "https://api.stlouisfed.org/fred/series/observations"
params = {
    "series_id": "GDP",
    "api_key": API_KEY,
    "file_type": "json",
    "observation_start": "2020-01-01",
    "observation_end": "2025-12-31"
}
r = requests.get(url, params=params)
data = r.json()
for obs in data["observations"]:
    if obs["value"] != ".":
        print(obs["date"], obs["value"])

2. Buscar series por palabra clave

python
params = {
    "api_key": API_KEY,
    "file_type": "json",
    "search_text": "inflation",
    "search_type": "full_text",  # o "series_id"
    "limit": 10
}
r = requests.get("https://api.stlouisfed.org/fred/series/search", params=params)

3. Usando pandas

python
import pandas as pd
import requests

def fetch_fred(series_id, api_key, start="2020-01-01"):
    url = "https://api.stlouisfed.org/fred/series/observations"
    params = {"series_id": series_id, "api_key": api_key,
              "file_type": "json", "observation_start": start}
    r = requests.get(url, params=params)
    df = pd.DataFrame(r.json()["observations"])
    df["date"] = pd.to_datetime(df["date"])
    df["value"] = pd.to_numeric(df["value"], errors="coerce")
    return df.set_index("date")["value"]

gdp = fetch_fred("GDP", API_KEY)
cpi = fetch_fred("CPIAUCSL", API_KEY)
fedfunds = fetch_fred("FEDFUNDS", API_KEY)

Scripts Disponibles

ScriptDescripción
fetch_series.pyDescarga una o más series FRED en CSV/JSON/Parquet
search_series.pyBusca series FRED por texto, categoría o tag
download_multiple.pyDescarga batches de series predefinidas por categoría

Series Esenciales (Headlines)

SerieDescripciónFrecuencia
GDPPIB Nominal (Billions $)Trimestral
GDPC1PIB Real (Billions chained $)Trimestral
CPIAUCSLIPC General (CPI All Items)Mensual
CPILFESLIPC Subyacente (Core CPI)Mensual
PCEPILFEPCE Subyacente (Core PCE)Mensual
FEDFUNDSTasa de Fondos FederalesDiaria
DFFTasa de Fondos Federales (efectiva)Diaria
DGS10Treasury a 10 añosDiaria
DGS2Treasury a 2 añosDiaria
T10Y2YSpread 10y-2y (curva invertida)Diaria
UNRATETasa de DesempleoMensual
PAYEMSNóminas no agrícolas (Nonfarm Payrolls)Mensual
M2SLM2 Money SupplyMensual
M1SLM1 Money SupplyMensual
VIXCLSVIX (volatilidad S&P 500)Diaria
BAA10YSpread BAA - 10y (credit spread)Diaria
TOTALSAVentas MinoristasMensual
INDPROProducción IndustrialMensual
HOUSTViviendas IniciadasMensual
MORTGAGE30USTasa Hipoteca 30 añosSemanal

Referencia completa: references/SERIES_REFERENCE.md (100+ series documentadas).


Buenas Prácticas

  1. Cachear datos: los datos macro no cambian frecuentemente; guardar en Parquet/CSV local
  2. Usar file_type=json: más fácil de parsear que XML
  3. Filtrar por fecha: usar observation_start para evitar descargar historia innecesaria
  4. Manejar valores ".": representan datos no disponibles (NaN)
  5. Rate limiting: 120 req/min = 1 request cada 0.5s como mínimo
  6. API Key: usar variable de entorno FRED_API_KEY
  7. Citar fuente: obligatorio incluir "This product uses the FRED API but is not endorsed or certified by the Federal Reserve Bank of St. Louis" en apps comerciales

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Fred Macro AI skill do?

API gratuita de la Reserva Federal (FRED): 840K+ series macroeconómicas (GDP, CPI, tasas, empleo, M2, VIX, treasuries).

Why use Fred Macro on TypingMind?

Because you install it once and use it with any model. Fred Macro is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Fred Macro in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/gauss314/skills/tree/main/skills/fred-macro. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Fred Macro?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Fred Macro?

As many as you like. As long as a model supports skills, you can use Fred Macro with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Fred Macro AI skill free?

Yes. It is published on GitHub by gauss314 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇