CFTC Commitments of Traders Scraper
Pricing
Pay per event
CFTC Commitments of Traders Scraper
๐ Extract public CFTC COT reports into structured futures positioning rows for trading research, dashboards, and risk monitoring.
Pricing
Pay per event
Rating
0.0
(0)
Developer
Stas Persiianenko
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Share
Extract public CFTC Commitments of Traders (COT) report files into structured market positioning rows for trading research, risk monitoring, and analytics.
What does CFTC Commitments of Traders Scraper do?
CFTC Commitments of Traders Scraper downloads public text reports from the U.S. Commodity Futures Trading Commission and converts each market row into a typed Apify dataset item.
It starts with the current disaggregated futures-only report and can also read the combined futures and options disaggregated report.
The actor is designed for recurring weekly COT workflows where analysts need clean rows instead of hand-parsing fixed public text files.
Who is it for?
- ๐ Commodity traders tracking producer, swap dealer, managed money, and non-reportable positioning.
- ๐ฆ Hedge fund research teams building weekly positioning dashboards.
- ๐งฎ Risk analysts monitoring open interest and concentration changes.
- ๐งโ๐ป Data engineers feeding CFTC COT data into warehouses or notebooks.
- ๐ฐ Market researchers who need repeatable source-backed COT extracts.
Why use this actor?
The CFTC publishes valuable files, but the rows are wide, comma-delimited, and inconvenient for downstream tools.
This actor normalizes the most important columns, preserves source provenance, and exports data in formats supported by Apify datasets.
Supported CFTC reports
disaggregated_futures_onlyโ current disaggregated futures-only report.disaggregated_combinedโ current disaggregated combined futures and options report.custom_urlโ direct CFTC text report URL for compatible files.
Data you can extract
| Field group | Examples |
|---|---|
| Market identity | market name, report date, CFTC contract code, exchange, commodity code |
| Open interest | all open interest and weekly change |
| Producer/merchant | long, short, percent of open interest, trader counts |
| Swap dealer | long, short, spread |
| Managed money | long, short, spread |
| Other reportables | long and short positions |
| Non-reportables | long and short positions |
| Concentration | gross and net four-trader concentration fields |
| Provenance | contract units, source URL, row number, scrape timestamp |
How much does it cost to scrape CFTC Commitments of Traders data?
The actor uses pay-per-event pricing.
There is a small start charge for each run and a per-row charge for each CFTC market row saved to the dataset.
The exact public pricing is shown on the Apify Store page and in the input sidebar before you run the actor.
Quick start
- Open the actor on Apify.
- Keep
COT report typeset toDisaggregated futures only. - Set
Maximum rowsto a small number for your first test. - Optionally enter a market filter such as
WHEAT,CORN,GOLD, orCRUDE. - Start the run.
- Export the dataset as JSON, CSV, Excel, or via API.
Input options
COT report type
Choose the public CFTC report file to fetch.
Use the default when you want current disaggregated futures-only rows.
Custom CFTC report URL
Use this only when COT report type is custom_url.
The URL should point to a compatible CFTC comma-delimited text report.
Maximum rows
Limits the number of dataset items saved.
Use a low value for testing and a higher value for production refreshes.
Market name contains
Optional case-insensitive filter applied to the CFTC market name.
Examples:
WHEATCORNCRUDEGOLDEURO
Date filters
From report date and To report date use YYYY-MM-DD format.
They are useful when a custom report URL contains multiple report periods.
Include raw CFTC row array
Advanced option for audit workflows.
When enabled, the actor adds rawRow with the parsed source field array.
Example input
{"reportType": "disaggregated_futures_only","marketNameFilter": "WHEAT","maxRows": 25,"includeRawRow": false}
Example output
{"marketName": "WHEAT-SRW - CHICAGO BOARD OF TRADE","reportDate": "2026-06-23","cftcContractMarketCode": "001602","exchange": "CBT","openInterestAll": 428305,"producerMerchantLongAll": 61192,"producerMerchantShortAll": 83194,"managedMoneyLongAll": 68457,"managedMoneyShortAll": 138890,"contractUnits": "(CONTRACTS OF 5,000 BUSHELS)","sourceUrl": "https://www.cftc.gov/dea/newcot/f_disagg.txt"}
Output fields
The default dataset contains one item per CFTC market row.
Important fields include:
marketNamereportDateopenInterestAllproducerMerchantLongAllproducerMerchantShortAllswapDealerLongAllswapDealerShortAllmanagedMoneyLongAllmanagedMoneyShortAlltotalReportableLongAlltotalReportableShortAllnonReportableLongAllnonReportableShortAllcontractUnitssourceUrl
Tips for best results
- Use a market filter for quick exploratory runs.
- Leave the filter blank to capture the full current weekly report.
- Schedule the actor weekly after the CFTC publishes fresh COT data.
- Keep
includeRawRowdisabled unless you need audit-level source mapping. - Use dataset CSV export for spreadsheets and API export for automated pipelines.
Integrations
Use this actor with:
- Apify Schedules for weekly report refreshes.
- Google Sheets or Excel exports for analyst workbooks.
- BigQuery, Snowflake, or S3 integrations for warehouse loading.
- Webhooks to notify trading desks when new COT data is available.
- Python notebooks for futures positioning research.
API usage with Node.js
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('automation-lab/cftc-commitments-of-traders-scraper').call({reportType: 'disaggregated_futures_only',marketNameFilter: 'WHEAT',maxRows: 25});console.log(run.defaultDatasetId);
API usage with Python
from apify_client import ApifyClientclient = ApifyClient('APIFY_TOKEN')run = client.actor('automation-lab/cftc-commitments-of-traders-scraper').call(run_input={'reportType': 'disaggregated_futures_only','marketNameFilter': 'WHEAT','maxRows': 25,})print(run['defaultDatasetId'])
API usage with cURL
curl -X POST "https://api.apify.com/v2/acts/automation-lab~cftc-commitments-of-traders-scraper/runs?token=$APIFY_TOKEN" \-H 'Content-Type: application/json' \-d '{"reportType":"disaggregated_futures_only","marketNameFilter":"WHEAT","maxRows":25}'
MCP integration
Use the Apify MCP server to run this actor from Claude Code, Claude Desktop, or other MCP clients.
MCP tool URL:
https://mcp.apify.com/?tools=automation-lab/cftc-commitments-of-traders-scraper
Claude Code setup:
$claude mcp add apify https://mcp.apify.com/?tools=automation-lab/cftc-commitments-of-traders-scraper
Claude Desktop JSON config:
{"mcpServers": {"apify-cftc-cot": {"url": "https://mcp.apify.com/?tools=automation-lab/cftc-commitments-of-traders-scraper"}}}
Example prompts:
- "Run the CFTC COT scraper for WHEAT and summarize managed money positioning."
- "Fetch the latest disaggregated futures-only COT rows and show the largest open interest markets."
- "Create a weekly COT monitoring workflow for gold and crude oil."
Scheduling weekly COT monitoring
CFTC reports are recurring datasets.
Create an Apify schedule to run this actor weekly and send the dataset to your storage integration.
This avoids manual downloads and keeps your downstream dashboards current.
Data quality notes
The actor preserves CFTC source URLs and row numbers.
Numeric fields are parsed into numbers when possible.
Blank or dot values from the source are returned as null.
Legality
This actor extracts publicly available CFTC report files.
Users are responsible for following Apify terms, CFTC website terms, and any internal compliance requirements for data use.
FAQ
How often does CFTC COT data update?
CFTC COT reports are recurring public reports. Many teams schedule this actor weekly to refresh dashboards after the latest publication.
Does this actor require a login or API key for CFTC?
No. It reads public CFTC text report files and does not require a CFTC account.
Troubleshooting
Why did I get zero rows?
Check whether your market name filter is too narrow.
Try removing the filter or using a broad commodity word such as WHEAT.
Why are some numeric values null?
CFTC files sometimes use . or blank cells for unavailable values.
The actor converts those values to null rather than inventing a number.
Can I scrape historical files?
Use custom_url with a compatible public CFTC report URL.
Historical file layouts may vary, so keep includeRawRow on for audit runs when testing a new URL.
Related scrapers
Explore other Automation Lab actors at:
Changelog
Initial version parses public CFTC disaggregated COT text files into typed dataset rows.
Support
If a CFTC report URL changes or a field needs to be added, open an issue on the actor page with the run ID and example market row.