morroco-stock-prices-scrapper avatar

morroco-stock-prices-scrapper

Pricing

Pay per usage

Go to Apify Store
morroco-stock-prices-scrapper

morroco-stock-prices-scrapper

Scrapes live and historical stock data for Casablanca-listed companies — prices, OHLCV history, order book, market cap, dividends, financials, shareholders, and analyst recommendations — in one structured dataset item per company.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Fateful Knuckle

Fateful Knuckle

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

5 days ago

Last modified

Share

Moroccan Stock Prices Scraper

Moroccan Stock Prices Scraper collects live and historical stock data for companies listed on the Casablanca Stock Exchange. For each company it gathers current prices, OHLC data, order books, price history, dividends, analyst recommendations and company financials from two public Moroccan financial sources, and returns a single clean JSON record per company. Try it by simply running it with the default input — no configuration needed.

Running on the Apify platform gives you scheduled runs, API access, monitoring, integrations (Google Sheets, Make, Zapier, and more), and the ability to export data in multiple formats.

Why use Moroccan Stock Prices Scraper?

  • Build datasets for portfolio tracking, backtesting, or research on the Moroccan market.
  • Monitor prices by scheduling daily runs after market close.
  • Cross-check sources — each company combines data from multiple sources so you can validate prices.
  • Skip the reverse-engineering — the underlying sites hide data behind SSR endpoints and rendered HTML; this Actor handles all of that for you.

How to use Moroccan Stock Prices Scraper

  1. Open the Actor and go to the Input tab.
  2. Optionally enter specific tickers (e.g. ATW, IAM, BCP). Leave empty to scrape every listed company (~80).
  3. Optionally toggle price history and adjust concurrency.
  4. Click Start and wait for the run to finish.
  5. Open the Output tab to browse results, or download the dataset.

Input

FieldTypeDescription
tickersarrayTicker symbols to scrape. Empty = all listed companies.
includeHistorybooleanInclude historical OHLCV price data (default true).
maxConcurrencyintegerNumber of companies scraped in parallel (default 5).

Example input:

{
"tickers": ["ATW", "IAM", "BCP"],
"includeHistory": true,
"maxConcurrency": 5
}

Output

Each dataset item is one company — a single record in a stable, canonical schema. Every item has the same keys (values are null when no data is available), all field names are English snake_case, all dates are ISO 8601, and all numbers are typed. You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

{
"ticker": "ATW",
"name": "ATTIJARIWAFA BANK",
"name_ar": "التجاري وفا بنك",
"name_en": "ATTIJARIWAFA BANK",
"isin": "MA0000012445",
"exchange": "Casablanca",
"sector": "Banques",
"asset_class": "Principal A",
"market_group": "Marché Principal",
"currency": "MAD",
"quotation_mode": "Continu",
"illiquid": false,
"shares_outstanding": 215140839,
"par_value": 10.0,
"listing_date": "1992-01-13",
"listing_price": 220.0,
"market_cap": 152965136529.0,
"week_52_high": 725.0,
"week_52_high_date": "2026-04-22",
"week_52_low": 498.0,
"week_52_low_date": "2025-06-30",
"company": {
"legal_name": "ATTIJARIWAFA BANK",
"headquarters": "2, boulevard Moulay Youssef, Casablanca",
"incorporation_date": "1911-05-31",
"auditor": "Deloitte Audit",
"fiscal_year_months": 12,
"business_purpose": "Établissement de crédit ayant pour objet la collecte de dépôts et la distribution de crédits.",
"management": [
{ "name": "Mohamed El Kettani", "role": "Président Directeur Général" }
]
},
"market_data": {
"last_price": 711.0,
"previous_close": 703.1,
"open": 703.0,
"high": 711.0,
"low": 703.0,
"change": 7.9,
"change_percent": 1.12,
"change_percent_ytd": 18.5,
"vwap": 707.4,
"volume_shares": 33519,
"volume_value": 23712756.7,
"market_cap": 152965136529.0,
"trade_count": 142,
"last_trade_price": 711.0,
"last_trade_time": "2026-05-15T15:30:30",
"best_bid_price": 710.0,
"best_bid_size": 120,
"best_ask_price": 712.0,
"best_ask_size": 85,
"upper_limit": 773.4,
"lower_limit": 632.8,
"theoretical_open_price": 705.0,
"theoretical_open_percent": 0.27,
"trading_state": "Cotation en continu",
"last_transactions": []
},
"order_book": {
"bids": [{ "count": 3, "quantity": 120, "price": 710.0 }],
"asks": [{ "count": 2, "quantity": 85, "price": 712.0 }]
},
"analyst": {
"recommendation": "Acheter",
"target_price": 760.0,
"target_currency": "MAD",
"recommendation_date": "2026-03-18"
},
"price_history": [
{
"date": "2026-05-15",
"open": 687.0,
"high": 705.0,
"low": 685.0,
"close": 703.1,
"volume_shares": 10302,
"volume_value": 7165420.0,
"change": 16.1,
"change_percent": 2.34
}
],
"dividends": [
{
"year": 2023,
"type": "Ordinaire",
"amount_gross": 15.5,
"amount_net": 13.36,
"ex_date": "2023-07-03",
"payment_date": "2023-07-10"
}
],
"key_figures": [
{
"year": 2023,
"revenue": 29512000000.0,
"net_income": 8200000000.0,
"operating_income": 14300000000.0,
"equity": 62100000000.0,
"share_capital": 2151408390.0,
"shares_outstanding": 215140839,
"consolidated": true
}
],
"shareholders": {
"as_of_date": "2025-12-31",
"holders": [{ "name": "Al Mada", "percentage": 46.5 }]
},
"scraped_at": "2026-05-17T10:00:00+00:00",
"scrape_ok": true
}

Data table

FieldDescription
tickerCasablanca Bourse ticker symbol
name / name_ar / name_enCompany name (French, Arabic, English)
isinISIN code
sector / asset_class / market_groupClassification
currencyTrading currency
shares_outstandingNumber of listed shares
par_value / listing_date / listing_priceListing details
market_capMarket capitalisation
week_52_high / week_52_low52-week price range
companyIssuer info: legal name, headquarters, auditor, management
market_dataLive prices, OHLC, volume, VWAP, order-book tops, trading limits
order_bookLive bids and asks
price_historyHistorical OHLCV records
key_figuresYearly revenue, net income, equity
dividendsDividend history
shareholdersShareholder structure with percentages
analystAnalyst recommendation and target price
scrape_okWhether any data was collected

Cost estimation

Both sources are lightweight HTTP requests (2–4 requests per company), so scraping the full list of ~80 companies consumes only a small number of compute units. Disable includeHistory for even faster, cheaper runs. The Apify free tier is more than enough for daily runs of the entire market.

Tips

  • Faster runs: set includeHistory to false and raise maxConcurrency.
  • Targeted runs: pass only the tickers you care about.
  • Scheduling: run the Actor after the Casablanca market close (~15:30 local time) to capture end-of-day prices.

FAQ, disclaimers, and support

Is scraping this data legal? This Actor only collects publicly available data from public web pages. It does not bypass authentication or access restricted content. You are responsible for complying with each site's Terms of Service and applicable laws when using the data.

Why is some data missing? Both sites occasionally undergo maintenance or backend outages. When a source is unavailable the Actor still returns a record for each company with scrape_ok reflecting whether data was obtained. Quotes from public sources may be delayed.

For issues or feature requests, use the Issues tab on the Actor page.