Senate Profiles参议员资料

该接口返回国会议员的资料详情:党派、所属州、职位及任职年限。

GEThttps://quote-fmp.com/stable/senate-profile

数据更新周期

该接口暂无固定更新周期(多为按需更新的参考或静态数据)。

接口说明

  • 过滤与分页:可按 是否在任、senateID、latestParty、latestPosition 过滤,page / limit 分页。
  • senateID 是跨接口唯一键:交易、持仓、净资产接口都用它关联。不要用姓名关联 —— 存在同名议员,对照 firstName(名)与 lastName(姓) 等历史记录,可检验策略信号在不同市场周期下的稳健性。
  • 覆盖参众两院:latestPosition 会区分 Senator 与 Representative,不是只有参议院。
  • 跨模块关联接口:House Trades By ID(众议院交易按议员ID查询) · Latest Senate Financial Disclosures(参议院最新财务披露) · Latest Insider Trading(最新内部人交易) · Institutional Ownership Filings(机构持股申报)

请求参数

6 个参数
参数类型要求示例说明
activeboolean可选true是否仅返回处于活跃状态的记录。
senateIDstring可选P000197参议员的唯一标识,用于国会交易数据。
latestPartystring可选Republican以某主体为对象获取最新持仓记录。
latestPositionstring可选Representative获取该主体的最新持仓头寸。
pagenumber可选0分页页码,从 0 开始,配合每页条数翻页取更多数据(从 0 起算的分页游标;当响应返回空数组 [] 时代表已翻至历史末页)
limitnumber可选500返回结果条数上限,用于控制单次响应大小。

调用代码示例

Python 关键代码

通过 /stable/senate-profile 检索参议员资料(参数:可选 active, senateID),输出 senateID(参议员 ID)、firstName(名)、lastName(姓)(示例 senateID=L000397)。

Python(核心参数与字段清洗逻辑)
resp = requests.get(
    "https://quote-fmp.com/stable/senate-profile",
    params={"active": "true", "senateID": "P000197", "latestParty": "Republican", "latestPosition": "Representative", "apikey": FMP_KEY},
    timeout=15,
)
resp.raise_for_status()
df = pd.DataFrame(resp.json())
# 按 birthDate 升序重排并数值化 yearsActive(任职年数)
df["yearsActive"] = pd.to_numeric(df["yearsActive"], errors="coerce")
df = df.sort_values("birthDate").reset_index(drop=True)

参数使用和避坑

2 组参数组合 · 2 条避坑

以下列出本接口在高频投研与回测场景下的常用 Query 参数组合写法:

投研场景Query 参数组合示例返回数据特征与用途
读取参议员资料最新首屏流(page=0, limit=50)page=0&limit=50请求 /stable/senate-profile 首屏记录,获取最新披露的 senateID、firstName、lastName(样本 senateID=L000397)。
递增游标翻页回填参议员资料(page=1, limit=100)page=1&limit=100向 /stable/senate-profile 传 page=1&limit=100,向历史纵深翻页归档 senateID、firstName、lastName 等 10 列。
参数与空值防守参议员资料:/stable/senate-profile(可选 active, senateID)空列表防守与 senateID 提取

/stable/senate-profile(可选 active, senateID)返回的 senateID(参议员 ID,样本 L000397)为当前有效记录;在写入本地维表或缓存前,请先去除首尾空白字符并校验非空。

落库主键与口径同步参议员资料:用 (senateID) 锁定唯一行并清洗 yearsActive

参议员资料返回的 yearsActive(任职年数,示例 31.6)在增量同步时,应按 (senateID) 覆盖更新已有记录。

返回数据

10 个字段

本接口示例响应共包含 10 个字段(数值型 1 个,文本/日期/布尔型 9 个)。下表列出全部字段名、类型、首条记录真实样本值与中文释义,实际返回会因接口与数据状态有所不同。

字段类型示例值说明
senateIDstring"L000397"参议员 ID
firstNamestring"Zoe"名
lastNamestring"Lofgren"姓
birthDatestring"1947-12-20"出生日期
latestPartystring"Democrat"所属政党
latestStatestring"CA"所在州
latestPositionstring"Representative"最近职位
imagestring"https://images.financialmodeli…"图片链接
activebooleantrue有效状态
yearsActivenumber31.6任职年数
查看响应数据示例(原始 JSON)
[
{
"senateID": "L000397",
"firstName": "Zoe",
"lastName": "Lofgren",
"birthDate": "1947-12-20",
"latestParty": "Democrat",
"latestState": "CA",
"latestPosition": "Representative",
"image": "https://images.financialmodelingprep.com/senate/L000397.jpg",
"active": true,
"yearsActive": 31.6
}
]

常见问题解答(FAQ)

2 个问题
自动化采集中如何搭配调用参议员资料(/stable/senate-profile)与同模块的 参议员任职记录?

在「Profile」模块内,参议员资料(/stable/senate-profile,可选 active, senateID)负责输出 senateID 与 firstName 等 10 项指标,Senate Positions(参议员任职记录)负责输出 8 项指标。

调用 /stable/senate-profile 采集参议员资料时,如何设计参数控制与批量请求策略?

工程上推荐在 /stable/senate-profile 中固定 limit 并从 page=0 起逐页拉取;同时复用 requests.Session() 保持 HTTP Keep-Alive,直接提取 senateID 与 firstName。

同模块相关接口对比

Profile

本接口路径 /stable/senate-profile,无必填参数。 同一模块「Profile」下共 4 个接口,下表列出其余 3 个, 按粒度与查询维度对比,避免选错接口。

接口路径核心差异与适用场景
参议员任职记录Senate Positions/stable/senate-positions某位议员担任过的国会职位,含任期起止、党派和所属州
参议员净资产明细Senate Net Worth/stable/senate-net-worth按申报年份返回某位议员的净资产明细披露,资产、负债和收入逐项列出
参议员净资产汇总Senate Net Worth Aggregated/stable/senate-net-worth-aggregated按年度返回某位议员的净资产汇总数据,并按资产与负债类型分组

Senate(美国国会交易)全部接口目录 →

需要稳定访问 参议员资料 数据?注册即可获取专属 API Key,免费体验全部接口。
免费试用 1 个月