# Bloomberg Scraper (`galih_rakasiwi/bloomberg-scraper`) Actor

Extract real-time quotes, historical OHLCV, financial statements, and news directly from Bloomberg. No Terminal required, fully structured for AI & Quant.

- **URL**: https://apify.com/galih\_rakasiwi/bloomberg-scraper.md
- **Developed by:** [RD.Galih Rakasiwi](https://apify.com/galih_rakasiwi) (community)
- **Categories:** Other
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$20.00 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Bloomberg Financial Data API

<p align="center">
  <strong>Institutional-Grade Bloomberg Financial Data — No Terminal Required</strong>
</p>

<p align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/badge/READINESS-Institutional_Grade-0ea5e9?style=for-the-badge&labelColor=0f172a">
    <img src="https://img.shields.io/badge/READINESS-Institutional_Grade-0284c7?style=for-the-badge&labelColor=f8fafc" alt="Institutional Grade">
  </picture>
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/badge/ENDPOINTS-57-22c55e?style=for-the-badge&labelColor=0f172a">
    <img src="https://img.shields.io/badge/ENDPOINTS-57-16a34a?style=for-the-badge&labelColor=f8fafc" alt="57 Endpoints">
  </picture>
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/badge/IDENTIFIERS-OpenFIGI_Powered-8b5cf6?style=for-the-badge&labelColor=0f172a">
    <img src="https://img.shields.io/badge/IDENTIFIERS-OpenFIGI_Powered-7c3aed?style=for-the-badge&labelColor=f8fafc" alt="OpenFIGI Powered">
  </picture>
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://img.shields.io/badge/AI-LLM_Ready-f97316?style=for-the-badge&labelColor=0f172a">
    <img src="https://img.shields.io/badge/AI-LLM_Ready-ea580c?style=for-the-badge&labelColor=f8fafc" alt="LLM Ready">
  </picture>
</p>

<br>

> **TL;DR** — Start this Actor, wait ~60 seconds for the container to boot, and you get a full REST API serving Bloomberg-quality financial data. Real-time quotes, historical OHLCV, financial statements, Bloomberg News with sentiment, FIGI identifier mapping, and built-in LLM prompt templates. Free tier works with zero API keys — just hit **Start**.

***

### Table of Contents

1. [What You Get](#-what-you-get)
2. [How It Works](#-how-it-works)
3. [How We Handle Stability & Anti-Bot](#-how-we-handle-stability--anti-bot)
4. [Feature Matrix](#-feature-matrix)
5. [Start the Actor](#-start-the-actor)
6. [Input Configuration](#-input-configuration)
7. [Output — What You'll See After Start](#-output--what-youll-see-after-start)
8. [Enriched Response Samples](#-enriched-response-samples)
9. [Integration Snippets](#-integration-snippets)
10. [Saved Task Examples](#-saved-task-examples)
11. [Disclaimer](#-disclaimer)

***

### What You Get

When you press **Start**, the Actor boots a FastAPI server inside an Apify container. You get a live REST API with:

| Capability | Description |
|------------|-------------|
| **Swagger UI** | Interactive API docs — click "Try it out" right from your browser |
| **OpenAPI 3.0 Spec** | Machine-readable spec — generate typed clients in any language |
| **57 REST Endpoints** | Quotes, financials, news, identifiers, market data, LLM prompts |
| **Auto Anti-Bot** | PerimeterX bypass handled automatically — no manual cookie management |
| **3-Tier Fallback** | Bloomberg REST → Bloomberg Web → OpenFIGI — always returns data |
| **LLM-Ready Output** | Structured JSON + 7 built-in prompt templates for AI financial agents |
| **Zero-Config Start** | No API keys required — OpenFIGI + public web data work out of the box |

***

### How It Works

```
┌───────────────────────────────────────────────────┐
│                   APIFY RUN                        │
│                                                    │
│   Start Actor  ──▶  Container Boots (~60s)         │
│                         │                          │
│                         ▼                          │
│   ┌─────────────────────────────────────────────┐ │
│   │         FASTAPI SERVER (:8000)               │ │
│   │                                              │ │
│   │  /api/v1/price/quote/AAPL                    │ │
│   │  /api/v1/financials/MSFT/all                 │ │
│   │  /api/v1/news/latest                         │ │
│   │  /api/v1/identifier/resolve/TSLA             │ │
│   │  /api/v1/prompts/investment-report?ticker=AAPL│ │
│   │  /api/v1/market/snapshot                     │ │
│   │  ...57 endpoints total                       │ │
│   │                                              │ │
│   │  Behind the scenes:                          │ │
│   │  ┌──────────────────────────────────┐       │ │
│   │  │  Bloomberg REST ──▶ Bloomberg Web│       │ │
│   │  │       │                    │      │       │ │
│   │  │       ▼                    ▼      │       │ │
│   │  │   (paid sub)       (auto-auth    │       │ │
│   │  │                     browser)     │       │ │
│   │  │                         │        │       │ │
│   │  │                         ▼        │       │ │
│   │  │                    ┌──────────┐  │       │ │
│   │  │                    │ OpenFIGI │◀─┤       │ │
│   │  │                    │ (always  │  │       │ │
│   │  │                    │  free)   │  │       │ │
│   │  │                    └──────────┘  │       │ │
│   │  └──────────────────────────────────┘       │ │
│   └─────────────────────────────────────────────┘ │
│                                                    │
│   ▲ Your code calls this Actor's URL              │
│     https://YOUR-RUN.apify.actor/api/v1/...       │
└───────────────────────────────────────────────────┘
```

**No polling. No file downloads. No webhook parsing.** You call a REST endpoint, you get JSON back — just like any production API. The run stays alive and serves requests until you stop it.

***

### How We Handle Stability & Anti-Bot

Bloomberg deploys PerimeterX (PX), a sophisticated anti-bot system that fingerprint-binds session tokens to the exact browser that solved its JavaScript challenge. Extracting cookies and replaying them through `httpx` or `curl` will always fail — the TLS/JA3 fingerprint, header order, and canvas hash no longer match.

#### Our Approach: Persistent Browser as API Proxy

The Actor launches a headless Chromium browser at startup and keeps it alive for the entire run. All data requests flow through `page.evaluate()` → `fetch()` — the request originates from the same browser that holds the valid PX session. The fingerprint is consistent. PerimeterX sees a normal browser.

#### Resilience Stack — 6 Layers of Defense

| # | Layer | Mechanism | What It Prevents |
|---|-------|-----------|-----------------|
| 1 | **Auto-Auth** | Login + PX challenge solved at container boot; session refreshed every 10 minutes | Manual cookie management; session expiration |
| 2 | **Stealth Profile** | Persistent browser context — spoofs `navigator.webdriver`, `navigator.plugins`, `window.chrome`, canvas fingerprint | PerimeterX detection on every request |
| 3 | **Token-Bucket Rate Limiter** | Configurable burst: 20–200 req/min per data source | 429 throttling; IP bans |
| 4 | **Exponential Backoff + Jitter** | Tenacity — 1s → 30s retry, 3 attempts | Transient network failures |
| 5 | **Circuit Breaker** | 5 consecutive failures → 60s open with automatic half-open probe | Cascading failure; resource exhaustion |
| 6 | **Graceful Degradation** | REST → Web → OpenFIGI priority chain. Returns partial data with `source` metadata | Total data loss — the API never fully fails |

#### Self-Healing Flow

```
Container Boot ──▶ auto-auth() ──▶ success? ──yes──▶ Serving Requests
                                    │
                                    no (rare in headless)
                                    │
Request → 403 blocked? → recover_session() → success? ──yes──▶ continue
                                                        │
                                                        no → fallback to OpenFIGI
                                                              ↳ API stays up
```

Every 10 minutes the session is proactively refreshed. If a request returns 403 mid-run, recovery is attempted automatically before falling back. **You never touch browser sessions or cookies.**

***

### Feature Matrix

#### Search

| # | Action | Endpoint | Auth |
|---|--------|----------|------|
| `GET` | Find Instruments | `/api/v1/search/instruments?query=Apple&exch_code=US` | None |
| `GET` | Find Companies | `/api/v1/search/company?query=Microsoft&limit=10` | None |
| `GET` | Find News | `/api/v1/search/news?ticker=AAPL&categories=Markets,Earnings` | Web |

#### Price — Real-Time & Historical

| # | Action | Endpoint | Auth |
|---|--------|----------|------|
| `GET` | Single Quote | `/api/v1/price/quote/AAPL` | Web |
| `POST` | Batch Quotes (≤50) | `/api/v1/price/quotes?tickers=AAPL,MSFT,GOOGL` | Web |
| `GET` | Historical OHLCV | `/api/v1/price/historical/AAPL?period=2y&interval=1d` | REST/Web |
| `GET` | Intraday Candles | `/api/v1/price/intraday/SPY?interval=5&hours_back=8` | Web |

#### Company

| # | Action | Endpoint | Auth |
|---|--------|----------|------|
| `GET` | Profile | `/api/v1/company/AAPL/profile` | Web |
| `GET` | Full + Key Metrics | `/api/v1/company/MSFT/full` | Web |
| `GET` | Peer Group | `/api/v1/company/TSLA/peers` | Web |
| `POST` | Side-by-Side Compare | `/api/v1/company/compare?tickers=AAPL,MSFT,GOOGL` | Web |

#### Market

| # | Action | Endpoint | Auth |
|---|--------|----------|------|
| `GET` | Full Market Snapshot | `/api/v1/market/snapshot` | Web |
| `GET` | Index Detail | `/api/v1/market/index/SPX` | Web |
| `GET` | Top Movers | `/api/v1/market/movers?category=gainers&limit=10` | Web |
| `GET` | Sector Performance | `/api/v1/market/sectors` | Web |

#### Financial Statements

| # | Action | Endpoint | Auth |
|---|--------|----------|------|
| `GET` | Income Statement | `/api/v1/financials/AAPL/income?period=quarterly` | REST/Web |
| `GET` | Balance Sheet | `/api/v1/financials/MSFT/balance?period=annual` | REST/Web |
| `GET` | Cash Flow | `/api/v1/financials/TSLA/cashflow?period=ttm` | REST/Web |
| `GET` | All Three Statements | `/api/v1/financials/JPM/all?period=annual` | REST/Web |

#### News & Sentiment

| # | Action | Endpoint | Auth |
|---|--------|----------|------|
| `GET` | Latest Headlines | `/api/v1/news/latest?page_size=20` | Web |
| `GET` | Full Article Body | `/api/v1/news/article?article_url=...` | Web |
| `GET` | News by Ticker | `/api/v1/news/ticker/AAPL` | Web |
| `GET` | News by Category | `/api/v1/news/category/Earnings` | Web |

#### Identifiers (OpenFIGI — Always Free)

| # | Action | Endpoint | Auth |
|---|--------|----------|------|
| `GET` | Resolve Ticker → Full Details | `/api/v1/identifier/resolve/AAPL` | None |
| `GET` | Map Any ID → FIGI | `/api/v1/identifier/map?id_type=ISIN&id_value=US0378331005` | None |
| `GET` | Ticker → FIGI | `/api/v1/identifier/figi/AAPL` | None |

#### LLM Prompt Templates

| # | Template | Endpoint |
|---|----------|----------|
| `GET` | Equity Research Summary | `/api/v1/prompts/summarize-company?ticker=AAPL` |
| `GET` | Multi-Company Comparison | `/api/v1/prompts/compare-companies?tickers=AAPL,MSFT,GOOGL` |
| `GET` | Market Strategy Brief | `/api/v1/prompts/analyze-market-trend` |
| `GET` | Full Investment Report | `/api/v1/prompts/investment-report?ticker=TSLA` |
| `GET` | Daily News Roundup | `/api/v1/prompts/daily-news-summary` |
| `GET` | Price Movement Analysis | `/api/v1/prompts/price-movement?ticker=NVDA` |
| `GET` | Risk Profile Assessment | `/api/v1/prompts/risk-analysis?ticker=JPM` |

Each prompt endpoint returns a structured prompt + list of suggested follow-up API calls. Feed directly into GPT-4, Claude, or any LLM.

***

### Start the Actor

#### Option 1 — Zero Config (Free Tier)

1. Click **Start** on this Actor's page
2. Wait ~60 seconds for the container to boot
3. Open the **Swagger UI** link from the Output tab
4. Start calling endpoints — OpenFIGI identifiers and public web data work with no API keys

#### Option 2 — With Bloomberg Web Access (Recommended)

Same as above. The browser auto-authenticates to Bloomberg's public web tier — no credentials needed. You get real-time quotes, company profiles, market snapshots, and news.

#### Option 3 — With Bloomberg REST Subscription

Fill in the optional input fields with your Bloomberg API credentials to unlock full reference data, historical financials, and higher rate limits:

```json
{
  "bloombergClientId": "YOUR_BBG_CLIENT_ID",
  "bloombergClientSecret": "YOUR_BBG_CLIENT_SECRET",
  "openfigiApiKey": "YOUR_OPENFIGI_KEY"
}
```

***

### Input Configuration

All fields are optional — the Actor works with zero configuration. The free data tier is always available.

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `openfigiApiKey` | string | *(empty)* | OpenFIGI API key for higher rate limits. Free — register at [openfigi.com](https://www.openfigi.com) |
| `bloombergClientId` | string | *(empty)* | Bloomberg REST API client ID — requires Bloomberg subscription |
| `bloombergClientSecret` | string | *(empty)* | Bloomberg REST API client secret |
| `bloombergJwtSecret` | string | *(empty)* | Bloomberg JWT signing secret for API authentication |
| `redisUrl` | string | `redis://localhost:6379/0` | Redis connection URL for response caching |
| `guiMode` | boolean | `false` | Run browser with visible UI — improves PerimeterX pass rate on GPU-enabled plans |
| `logLevel` | select | `INFO` | Logging verbosity — `DEBUG`, `INFO`, `WARNING`, `ERROR` |
| `port` | integer | `8000` | Internal API server port |

**Input JSON preview** (as configured in Apify Console):

```json
{
  "openfigiApiKey": "",
  "bloombergClientId": "",
  "bloombergClientSecret": "",
  "bloombergJwtSecret": "",
  "redisUrl": "redis://localhost:6379/0",
  "guiMode": false,
  "logLevel": "INFO",
  "port": 8000
}
```

***

### Output — What You'll See After Start

Once the container is running, the **Output** tab in Apify Console shows these live links:

| Link | What It Is |
|------|------------|
| **Swagger UI** | Interactive API documentation — browse all endpoints and test calls directly |
| **OpenAPI Spec** | Machine-readable `openapi.json` — generate SDKs with OpenAPI Generator |
| **ReDoc** | Clean, readable alternative API docs |
| **Health Check** | Verify the server is alive — `{"status":"ok","version":"2.0.0"}` |

Use the **container URL** as your API base — every run gets its own subdomain:

```
https://YOUR-RUN-ID.apify.actor/api/v1/...
```

***

### Enriched Response Samples

Every response follows a consistent envelope:

#### `GET /api/v1/price/quote/AAPL`

```json
{
  "status": "success",
  "quote": {
    "ticker": "AAPL",
    "price": 228.17,
    "change": 2.83,
    "change_pct": 1.26,
    "bid": 228.15,
    "ask": 228.20,
    "open": 226.00,
    "previous_close": 225.34,
    "day_high": 229.10,
    "day_low": 225.80,
    "volume": 48320000,
    "avg_volume_10d": 52000000,
    "market_cap": 3480000000000,
    "fifty_two_week_high": 260.10,
    "fifty_two_week_low": 164.08,
    "timestamp": "2026-08-09T14:30:00Z",
    "is_delayed": true,
    "delay_minutes": 15,
    "exchange": "NASDAQ",
    "currency": "USD"
  }
}
```

#### `GET /api/v1/financials/AAPL/income?period=annual`

```json
{
  "status": "success",
  "ticker": "AAPL",
  "period": "annual",
  "income_statements": [
    {
      "ticker": "AAPL",
      "period": "annual",
      "fiscal_year": 2025,
      "period_end_date": "2025-09-30",
      "currency": "USD",
      "revenue": 394328000000,
      "cost_of_revenue": 220000000000,
      "gross_profit": 174328000000,
      "operating_income": 120328000000,
      "net_income": 98528000000,
      "eps_basic": 6.45,
      "eps_diluted": 6.38,
      "ebitda": 134000000000,
      "gross_margin": 0.442,
      "operating_margin": 0.305,
      "net_margin": 0.250,
      "shares_basic": 15270000000,
      "shares_diluted": 15450000000
    }
  ]
}
```

#### `GET /api/v1/market/snapshot`

```json
{
  "status": "success",
  "snapshot": {
    "timestamp": "2026-08-09T14:30:00Z",
    "indices": [
      { "ticker": "SPX", "name": "S&P 500", "last_price": 5983.45, "price_change_pct": 0.74 },
      { "ticker": "NDX", "name": "Nasdaq 100", "last_price": 21056.32, "price_change_pct": 0.91 },
      { "ticker": "DJI", "name": "Dow Jones", "last_price": 42310.18, "price_change_pct": 0.32 }
    ],
    "sector_performance": [
      { "sector": "Technology", "change_pct": 1.5 },
      { "sector": "Financials", "change_pct": -0.3 }
    ],
    "treasury_yields": { "2Y": 3.98, "10Y": 4.15 },
    "vix": 14.8
  }
}
```

#### Error Envelope (All Endpoints)

```json
{
  "status": "error",
  "ticker": "INVALID$$",
  "message": "Unable to resolve ticker symbol"
}
```

***

### Integration Snippets

Replace `YOUR-RUN-ID` with the run ID from Apify Console, or use the container URL from the Output tab.

#### Python — Portfolio Price Check

```python
import asyncio
import httpx

BASE = "https://YOUR-RUN-ID.apify.actor/api/v1"

async def check_portfolio():
    async with httpx.AsyncClient(timeout=30) as client:
        resp = await client.post(f"{BASE}/price/quotes", params={
            "tickers": "AAPL,MSFT,GOOGL,AMZN,NVDA,META,TSLA"
        })
        data = resp.json()
        for q in data["quotes"]:
            print(f"{q['ticker']}: ${q['price']:.2f} ({q['change_pct']:+.2f}%)")
```

#### Python — Pipe Market Data to an LLM

```python
import asyncio
import httpx

BASE = "https://YOUR-RUN-ID.apify.actor/api/v1"

async def market_briefing_for_llm():
    async with httpx.AsyncClient(timeout=30) as client:
        snapshot, prompt = await asyncio.gather(
            client.get(f"{BASE}/market/snapshot"),
            client.get(f"{BASE}/prompts/analyze-market-trend"),
        )
    return {
        "data": snapshot.json()["snapshot"],
        "system_prompt": prompt.json()["prompt"],
        # Send both to your LLM of choice
    }
```

#### Python — Full Equity Research Pipeline

```python
import asyncio
import httpx

BASE = "https://YOUR-RUN-ID.apify.actor/api/v1"

async def equity_deep_dive(ticker: str):
    async with httpx.AsyncClient(timeout=30) as client:
        profile, company, peers, financials, news, prompt = await asyncio.gather(
            client.get(f"{BASE}/company/{ticker}/profile"),
            client.get(f"{BASE}/company/{ticker}/full"),
            client.get(f"{BASE}/company/{ticker}/peers"),
            client.get(f"{BASE}/financials/{ticker}/all", params={"period": "annual"}),
            client.get(f"{BASE}/news/ticker/{ticker}", params={"page_size": 5}),
            client.get(f"{BASE}/prompts/investment-report", params={"ticker": ticker}),
        )
    return {
        "profile": profile.json()["profile"],
        "metrics": company.json()["data"],
        "peers": peers.json()["data"],
        "financials": financials.json(),
        "recent_news": news.json()["articles"],
        "llm_prompt": prompt.json()["prompt"],
    }
```

#### cURL — Quick Start

```bash
## Health check
curl -s https://YOUR-RUN-ID.apify.actor/health | jq

## Single quote
curl -s "https://YOUR-RUN-ID.apify.actor/api/v1/price/quote/AAPL" | jq

## Batch quotes
curl -s -X POST \
  "https://YOUR-RUN-ID.apify.actor/api/v1/price/quotes?tickers=AAPL,MSFT,NVDA" | jq

## Historical OHLCV (2 years, weekly bars)
curl -s "https://YOUR-RUN-ID.apify.actor/api/v1/price/historical/AAPL?period=2y&interval=1wk" \
  | jq '.bars[:4]'

## Full financial statements
curl -s "https://YOUR-RUN-ID.apify.actor/api/v1/financials/MSFT/all?period=annual" | jq
```

***

### Saved Task Examples

Pre-configured Actor inputs you can save in Apify Console for one-click reuse.

#### Task 1 — "Free Tier Quick Start"

Zero API keys. Uses only OpenFIGI identifier mapping and public web data. Ideal for first-time evaluation.

```json
{
  "openfigiApiKey": "",
  "logLevel": "INFO",
  "port": 8000
}
```

**Use for:** FIGI mapping, basic instrument search, evaluating the Actor before committing credentials.

***

#### Task 2 — "Bloomberg Web Access — Full Data"

No subscription needed. Enables real-time quotes, financial statements, market snapshots, and news through browser-based web access. `guiMode: true` significantly improves PerimeterX pass rate.

```json
{
  "openfigiApiKey": "YOUR_FREE_OPENFIGI_KEY",
  "guiMode": true,
  "logLevel": "INFO",
  "port": 8000
}
```

**Use for:** Daily market briefings, portfolio tracking, equity research, news aggregation.

***

#### Task 3 — "Institutional — Bloomberg REST + Cache"

Full Bloomberg REST API with Redis caching for production workloads. Unlocks maximum rate limits and complete reference data.

```json
{
  "openfigiApiKey": "YOUR_OPENFIGI_KEY",
  "bloombergClientId": "YOUR_BBG_CLIENT_ID",
  "bloombergClientSecret": "YOUR_BBG_CLIENT_SECRET",
  "bloombergJwtSecret": "YOUR_BBG_JWT_SECRET",
  "redisUrl": "redis://your-redis-host:6379/0",
  "guiMode": true,
  "logLevel": "DEBUG",
  "port": 8000
}
```

**Use for:** High-frequency data pipelines, production trading support systems, institutional research automation.

***

### Disclaimer

**This Actor does not redistribute Bloomberg L.P. proprietary data.** All data is fetched in real-time from publicly accessible endpoints and the OpenFIGI API (a Bloomberg-owned open standard). Users with Bloomberg subscriptions may configure their own API credentials for access to licensed data.

- **Bloomberg®**, **Bloomberg Terminal®**, and **BLOOMBERG PROFESSIONAL®** are trademarks and service marks of Bloomberg Finance L.P.
- **FIGI®** and **OpenFIGI®** are registered trademarks of Bloomberg Finance L.P.
- This project is not affiliated with, endorsed by, or sponsored by Bloomberg Finance L.P. or The Open Group.

Users are responsible for ensuring their use of this Actor complies with Bloomberg's terms of service and any applicable data licensing agreements.

***

<p align="center">
  <sub>Built by <a href="https://apify.com/galih_rakasiwi">galih_rakasiwi</a> · <a href="https://apify.com/galih_rakasiwi/bloomberg-scrapper">Apify Store</a> · MIT Licensed</sub>
</p>

# Actor input Schema

## `openfigiApiKey` (type: `string`):

OpenFIGI API key for higher rate limits on identifier mapping. Free from openfigi.com.

## `bloombergClientId` (type: `string`):

Bloomberg REST API client ID (requires Bloomberg subscription).

## `bloombergClientSecret` (type: `string`):

Bloomberg REST API client secret.

## `bloombergJwtSecret` (type: `string`):

Bloomberg JWT signing secret for API authentication.

## `redisUrl` (type: `string`):

Redis connection URL for caching (default: redis://localhost:6379/0).

## `guiMode` (type: `boolean`):

Run browser in visible mode for PerimeterX bypass (production servers with GUI).

## `logLevel` (type: `string`):

Logging verbosity.

## `port` (type: `integer`):

Port for the API server (default: 8000).

## Actor input object example

```json
{
  "redisUrl": "redis://localhost:6379/0",
  "guiMode": false,
  "logLevel": "INFO",
  "port": 8000
}
```

# Actor output Schema

## `healthCheck` (type: `string`):

Verify the API server is running. Returns service status and version.

## `apiDocs` (type: `string`):

Interactive API documentation with all endpoints. Test calls directly from the browser.

## `openApiSpec` (type: `string`):

Machine-readable OpenAPI 3.0 JSON spec — use to generate clients or integrate with API tools.

## `redoc` (type: `string`):

Alternative API documentation with a clean, readable layout.

## `runUrl` (type: `string`):

View the full run details including logs, storage, and metrics in Apify Console.

# 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 = {
    "openfigiApiKey": "",
    "bloombergClientId": "",
    "bloombergClientSecret": "",
    "bloombergJwtSecret": "",
    "redisUrl": "redis://localhost:6379/0"
};

// Run the Actor and wait for it to finish
const run = await client.actor("galih_rakasiwi/bloomberg-scraper").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 = {
    "openfigiApiKey": "",
    "bloombergClientId": "",
    "bloombergClientSecret": "",
    "bloombergJwtSecret": "",
    "redisUrl": "redis://localhost:6379/0",
}

# Run the Actor and wait for it to finish
run = client.actor("galih_rakasiwi/bloomberg-scraper").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 '{
  "openfigiApiKey": "",
  "bloombergClientId": "",
  "bloombergClientSecret": "",
  "bloombergJwtSecret": "",
  "redisUrl": "redis://localhost:6379/0"
}' |
apify call galih_rakasiwi/bloomberg-scraper --silent --output-dataset

```

## MCP server setup

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

```

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/oHqc5mGgnY8dt5SP5/builds/neBd57wuqsHV5gcwc/openapi.json
