Extract stock market data
Rocket Scraper makes it easy to extract detailed financial information from stock market websites and trading platforms. Our AI automatically identifies and extracts key market data, stock prices, company metrics, and trading indicators without requiring any selectors or maintenance.
Key Benefits
- Comprehensive Data Extraction: Automatically extract stock prices, trading volumes, market caps, and financial metrics from any market page.
- Historical Data: Collect historical price data, trading patterns, and market trends.
- Market Analysis: Track price movements, volatility indicators, and technical analysis data across multiple stocks.
Example: Stock Market Data
Here's how to extract detailed stock market information without any selectors:
- Python
- Node.js
from rocketscraper import RocketClient
try:
client = RocketClient('YOUR_API_KEY')
schema = {
"stockInfo": {
"symbol": "string",
"companyName": "string",
"exchange": "string"
},
"price": {
"current": "number",
"change": "number",
"changePercent": "number",
"currency": "string"
},
"metrics": {
"marketCap": "number",
"volume": "number",
"avgVolume": "number",
"peRatio": "number"
},
"trading": {
"dayHigh": "number",
"dayLow": "number",
"52WeekHigh": "number",
"52WeekLow": "number"
},
"fundamentals": {
"eps": "number",
"dividend": "number",
"beta": "number"
}
}
result = client.scrape(
'https://example.com/stocks/AAPL',
schema
)
print(result)
except Exception as e:
print(f"Error: {e}")
import { createRocketClient } from 'rocketscraper';
try {
const client = createRocketClient({
apiKey: 'YOUR_API_KEY'
});
const schema = {
stockInfo: {
symbol: "string",
companyName: "string",
exchange: "string"
},
price: {
current: "number",
change: "number",
changePercent: "number",
currency: "string"
},
metrics: {
marketCap: "number",
volume: "number",
avgVolume: "number",
peRatio: "number"
},
trading: {
dayHigh: "number",
dayLow: "number",
"52WeekHigh": "number",
"52WeekLow": "number"
},
fundamentals: {
eps: "number",
dividend: "number",
beta: "number"
}
};
const result = await client.scrape({
url: 'https://example.com/stocks/AAPL',
schema
});
console.log(result);
} catch (error) {
console.error('Error:', error.message);
}
Example Output
{
"stockInfo": {
"symbol": "AAPL",
"companyName": "Apple Inc.",
"exchange": "NASDAQ"
},
"price": {
"current": 178.72,
"change": 2.35,
"changePercent": 1.33,
"currency": "USD"
},
"metrics": {
"marketCap": 2790000000000,
"volume": 52436789,
"avgVolume": 48965231,
"peRatio": 29.45
},
"trading": {
"dayHigh": 179.85,
"dayLow": 176.89,
"52WeekHigh": 198.23,
"52WeekLow": 124.17
},
"fundamentals": {
"eps": 6.07,
"dividend": 0.96,
"beta": 1.28
}
}
Try It Now
Ready to extract stock market data? Test out Rocket Scraper's AI-powered extraction in our interactive playground.