# Investing.com Commodities All-in-One: Gold, Oil & Futures (`pintostudio/investing-com-commodities`) Actor

One scraper for everything about a commodity on Investing.com (gold, silver, crude oil, natural gas, wheat, coffee...): live price, historical prices, technical analysis, news, related markets and full commodity group lists (metals, energy, grains, softs, meats). 32 languages, any currency.

- **URL**: https://apify.com/pintostudio/investing-com-commodities.md
- **Developed by:** [Pinto Studio](https://apify.com/pintostudio) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 commodity data

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Investing.com Commodities All-in-One: Gold, Oil & Futures

Get **commodities** data from [Investing.com](https://www.investing.com): prices, history
and more. Choose exactly what you need, in **32 languages** and in **any currency**.

### What you can get

Pick one or more options in **"What do you want to get?"** (`dataToGet`):

| Option | Name | What you get |
|--------|------|--------------|
| `overview` | Quote & overview | Current price, change, open/high/low, 52-week range, contract details and more. |
| `historical` | Historical prices | Daily, weekly or monthly prices (open, high, low, close, volume, change %) between two dates. |
| `technical` | Technical analysis | Indicators (RSI, MACD, ...), moving averages (5 to 200) and pivot points, with buy/sell signals. |
| `news` | Latest news | Latest news articles about it (title, summary, link, date, source). |
| `related` | Related instruments | Other instruments people also watch, with their price and change. |
| `commodity_group` | MARKET: commodity group | All commodities of a group (metals, energy, grains, softs or meats) with price and change. |

### How to use it (no code needed)

1. Open the actor on Apify and go to the **Input** tab.
2. In **"Commodities to look up"**, type what you want, one per line, for example:
   `Gold`, `Crude Oil WTI`.
3. In **"What do you want to get?"**, tick the data you need.
4. (Optional) choose a **Language** and a **Currency**.
5. Click **Start**.
6. When it finishes, open the **Output** tab. You can download the results as
   **JSON, CSV, Excel** or view them as a table.

### Input fields

| Field | What it does | Example |
|-------|--------------|---------|
| `instruments` | Commodity names (Gold, Brent Oil, Coffee) or investing.com links. One per line. | `["Gold", "Crude Oil WTI"]` |
| `dataToGet` | What you want. Pick one or more of the options in the table above. | `["overview", "historical"]` |
| `language` | Language of names, descriptions and news (32 languages). | `"en"`, `"pt-br"`, `"de"`, `"ja"` |
| `currency` | Optional. Show prices in another currency. `local` = the currency of the chosen language's country. Empty = the instrument's own currency. | `"EUR"`, `"BRL"`, `"local"` |
| `historicalFrom / historicalTo` | Dates for historical prices. Empty = the last 30 days. | `"2026-01-01"` |
| `historicalInterval` | `daily`, `weekly` or `monthly`. | `"daily"` |
| `historicalOrder` | `asc` (oldest first) or `desc` (newest first). | `"asc"` |
| `splitHistoricalRows` | `true` saves every day as its own row: best for Excel/CSV. | `false` |
| `technicalInterval` | Timeframe of the technical analysis: `1m`, `5m`, `15m`, `30m`, `1h`, `5h`, `1d`, `1w`, `1mo` or `all`. | `"1d"` |
| `commodityGroup` | `metals`, `energy`, `grains`, `softs` or `meats`. | `"energy"` |
| `marketLimit` | Maximum number of rows for the MARKET options (up to 2000). | `100` |
| `proxyType` | `ours` (default): our proxy, included in the price. `own`: use your own proxy. | `"ours"` |
| `ownProxyUrls` | Your proxy URLs, only used when `proxyType` is `own`. | `["http://user:pass@host:port"]` |

#### Example inputs

**1. Prices and history**

```json
{
  "instruments": [
    "Gold",
    "Crude Oil WTI"
  ],
  "dataToGet": [
    "overview",
    "historical"
  ],
  "historicalFrom": "2026-01-01",
  "historicalTo": "2026-06-30"
}
```

**2. In Portuguese, prices in Brazilian reais**

```json
{
  "instruments": [
    "Coffee"
  ],
  "dataToGet": [
    "overview",
    "news"
  ],
  "language": "pt-br",
  "currency": "BRL"
}
```

**3. Market data (no list needed)**

```json
{
  "dataToGet": [
    "commodity_group"
  ],
  "commodityGroup": "energy"
}
```

Market options return **one row per item** (e.g. one row per stock), so they look like a normal table.

### What the results look like

Every result is one item in the dataset. For the commodities you typed, you get **one
item per commodity and per option**:

| Field | Meaning |
|-------|---------|
| `input` | What you typed |
| `dataType` | Which option this item is (`overview`, `historical`, ...) |
| `instrument` | The commodity that was found: name, symbol, link, and how it was found |
| `language` | Language of the texts |
| `currency` | Currency of the prices in this item |
| `meta` | Extra details, e.g. the exchange rate used when you asked for another currency |
| `data` | The data itself |
| `error` | `null`, or the reason this item failed (the other items still work) |

Example (shortened):

```json
{
  "input": "Gold",
  "dataType": "overview",
  "instrument": {
    "kind": "commodities",
    "slug": "gold",
    "cid": null,
    "url": "https://www.investing.com/commodities/gold",
    "found_by": "list (name)",
    "id": "8830",
    "name": "Gold Futures",
    "symbol": null,
    "country": null,
    "currency": "USD",
    "other_matches": 0
  },
  "language": "en",
  "currency": "USD",
  "meta": {
    "currency": "USD",
    "native_currency": "USD"
  },
  "data": {
    "id": "8830",
    "kind": "commodities",
    "slug": "gold",
    "type": "commodity",
    "name": "Gold Futures",
    "short_name": "Gold",
    "symbol": "GC1!",
    "url": "https://www.investing.com/commodities/gold",
    "isin": null,
    "is_open": false,
    "is_crypto": false,
    "exchange": {
      "id": "1004",
      "code": "",
      "name": null,
      "country": null,
      "flag": "gold"
    },
    "price": {
      "last": 4320.5,
      "previous_close": 4298,
      "open": 4310.1,
      "high": 4351.5,
      "low": 4289.55,
      "change": 22.5,
      "change_percent": 0.52,
      "bid": 4312.1,
      "ask": 4322.8,
      "currency": "USD",
      "decimals": 2,
      "delayed": false,
      "updated_at": "2026-09-25T20:59:59+00:00"
    },
    "range_52_weeks": {
      "low": 3785.5,
      "high": 5626.8
    },
    "...": "6 more fields"
  },
  "error": null
}
```

### Call it from your code

Replace `YOUR_API_TOKEN` with your token (Apify Console → Settings → Integrations)
and `pintostudio` with your Apify username.

**Using the API** (runs the actor and returns the results in one call):

```bash
curl -X POST "https://api.apify.com/v2/acts/pintostudio~investing-com-commodities/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"instruments": ["Gold"], "dataToGet": ["overview"]}'
```

**Python** (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("pintostudio/investing-com-commodities").call(run_input={
    "instruments": ["Gold", "Crude Oil WTI"],
    "dataToGet": ["overview"],
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["input"], item["dataType"], item["data"])
```

**JavaScript** (`npm install apify-client`):

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('pintostudio/investing-com-commodities').call({
    instruments: ["Gold", "Crude Oil WTI"],
    dataToGet: ['overview'],
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### Proxy

Investing.com blocks many IPs, so every request goes through a proxy. You have two options in **Proxy** (`proxyType`):

| Option | What happens | Who pays for the proxy |
|--------|--------------|------------------------|
| **Our proxy** (default) | Requests go through our proxy. Nothing to set up. | Included in the event price, no extra cost. |
| **My own proxy** | Requests go through the proxy URLs you add in **Your proxy URLs** (`ownProxyUrls`). Several URLs are rotated. | You, directly to your proxy provider. The actor price stays the same. |

Apify Proxy is not used by this actor, so it never adds proxy usage to your Apify bill.
If you choose **My own proxy** without adding a URL, the run stops with a clear message.

### Pricing

You only pay for what you get (pay per event). Items that fail are **never charged**.

| Event | Price | When |
|-------|-------|------|
| Actor start | $0.00005 | Once per run |
| Commodity data | $0.005 | Each commodity × option (overview, historical, technical, news, related) |
| Market row | $0.0005 | Each row of a commodity group list (metals, energy, grains, softs, meats) |

**Examples:** overview of gold, silver and oil ≈ $0.015 · 10 years of daily gold prices ≈ $0.005 · the full energy list (≈15 rows) ≈ $0.0075.
Historical prices are charged once per commodity, no matter how many days you ask for.
Set a **maximum cost per run** and the actor stops cleanly when it is reached.
Tip: ask for several commodities and options in one run, it is faster than many small runs.

### Good to know

- **Not sure what to type?** Paste the link of the commodity from investing.com.
  It always works.
- **Currency:** prices are converted with the live exchange rate. Historical prices,
  dividends, earnings and financial statements use the rate of **each date**.
  Percentages, ratios and volumes are never converted. The item's `meta` shows the
  rate used.
- **Language:** changes names, descriptions and news. Numbers stay the same.
- **Errors:** if one commodity or option fails, you get an item with an
  `error` explaining why, and everything else still runs.
- **Proxy:** see [Proxy](#proxy) above. By default you do not need to do anything.

# Actor input Schema

## `instruments` (type: `array`):

Commodity names (Gold, Brent Oil, Coffee) or investing.com links. One per line.

## `dataToGet` (type: `array`):

Pick one or more. Options starting with MARKET do not need anything in the list above.

## `language` (type: `string`):

investing.com edition to read. Names, descriptions and news come in this language.

## `currency` (type: `string`):

Convert prices into this currency, e.g. EUR, BRL, JPY. Type 'local' for the currency of the chosen language's country. Leave empty to keep each instrument's own currency.

## `historicalFrom` (type: `string`):

First date for 'Historical prices'. Empty = 30 days ago.

## `historicalTo` (type: `string`):

Last date for 'Historical prices'. Empty = today.

## `historicalInterval` (type: `string`):

One row per day, per week or per month.

## `historicalOrder` (type: `string`):

Oldest first or newest first.

## `splitHistoricalRows` (type: `boolean`):

Save each price row as its own dataset item (best for Excel/CSV export).

## `technicalInterval` (type: `string`):

Timeframe of the technical analysis (Daily is the usual choice).

## `commodityGroup` (type: `string`):

Which group of commodities the MARKET option returns.

## `marketLimit` (type: `integer`):

How many rows the MARKET options return at most.

## `proxyType` (type: `string`):

Our proxy is included in the price, you pay nothing extra. Choose "My own proxy" to send the requests through your own proxy instead (its traffic is billed by your proxy provider, not by us).

## `ownProxyUrls` (type: `array`):

Only used when Proxy is "My own proxy". One URL per line, e.g. http://user:pass@host:port. Several URLs are rotated.

## Actor input object example

```json
{
  "instruments": [
    "Gold",
    "Crude Oil WTI"
  ],
  "dataToGet": [
    "overview"
  ],
  "language": "en",
  "historicalInterval": "daily",
  "historicalOrder": "asc",
  "splitHistoricalRows": false,
  "technicalInterval": "1d",
  "commodityGroup": "metals",
  "marketLimit": 100,
  "proxyType": "ours"
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "instruments": [
        "Gold",
        "Crude Oil WTI"
    ],
    "dataToGet": [
        "overview"
    ],
    "proxyType": "ours"
};

// Run the Actor and wait for it to finish
const run = await client.actor("pintostudio/investing-com-commodities").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "instruments": [
        "Gold",
        "Crude Oil WTI",
    ],
    "dataToGet": ["overview"],
    "proxyType": "ours",
}

# Run the Actor and wait for it to finish
run = client.actor("pintostudio/investing-com-commodities").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "instruments": [
    "Gold",
    "Crude Oil WTI"
  ],
  "dataToGet": [
    "overview"
  ],
  "proxyType": "ours"
}' |
apify call pintostudio/investing-com-commodities --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,pintostudio/investing-com-commodities"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/tsd0vwUOvqgkHGwx8/builds/X56vmzIt2m3bN8uaX/openapi.json
