- TypeScript
- Next.js
- Cheerio
- Vercel
B3 company data API
Price, fundamentals and dividends for Brazilian stocks and REITs (FIIs) on B3, as clean JSON from a single URL.
GET https://hideki.one/api/b3/{ticker}Try it
GET https://hideki.one/api/b3/PETR4Use it in your code
curl https://hideki.one/api/b3/PETR4Response format
Money in Brazilian reais; percentages as fractions (0.0743 = 7.43%); dates in ISO 8601. An indicator the source does not publish for an asset is omitted.
Common fields
- kind"stock" | "reit"
- Stock or REIT (FII).
- tickerstring
- Upper-case ticker.
- namestring
- Company or fund name.
- pricenumber
- Price, in reais.
- change12mnumber
- Price change over 12 months.
- dividendYield12mnumber
- Trailing 12-month dividend yield.
- indicatorsobject
- Fundamentals, by key (lists alongside).
- dividends[]object[]
- Up to 10 dividends, newest first: type, exDate, payDate, amount.
- profileobject
- REITs only: segment, type, mandate, management.
- sourcestring
- Page the data came from.
- fetchedAtstring
- When it was collected (ISO 8601).
Stock indicators
- pl
- P/E
- pvp
- P/B
- psr
- P/S
- evEbitda
- EV/EBITDA
- lpa
- EPS
- vpa
- Book value per share
- grossMargin
- Gross margin
- ebitdaMargin
- EBITDA margin
- netMargin
- Net margin
- roe
- ROE
- roa
- ROA
- roic
- ROIC
- dividendYield
- Dividend yield
- payout
- Payout
- currentRatio
- Current ratio
- netDebtToEbitda
- Net debt/EBITDA
- netDebtToEquity
- Net debt/Equity
- revenueCagr5y
- Revenue CAGR (5 years)
- earningsCagr5y
- Earnings CAGR (5 years)
REIT indicators
- pvp
- P/B
- vacancy
- Vacancy
- managementFee
- Management fee
- bookValuePerShare
- Book value per share
- netAssets
- Net assets
- lastDividend
- Last dividend
- shareholders
- Shareholders
- sharesOutstanding
- Shares outstanding
- profile.segment
- Segment
- profile.fundType
- Type
- profile.mandate
- Mandate
- profile.managementType
- Management
Errors and limits
- 400
invalid_tickerNot shaped like a B3 ticker. - 404
not_foundNo stock or REIT with this ticker. - 429
rate_limitedRate limit hit; see the Retry-After header. - 502
upstream_unavailableThe data source did not respond.
Up to 30 requests per minute per IP. Each response is cached on Vercel for 20 minutes, per ticker: the same request within that window never reaches the source.
How it works
A Next.js route handler validates the ticker and fetches the asset page from Investidor10, trying stock or REIT first depending on how the ticker ends.
The HTML is read with Cheerio by indicator label, not by position: an indicator the site omits does not shift the others.
Numbers come out normalized (reais, fractions, ISO dates) and the response is cached for 20 minutes on the Vercel CDN.
The old version, with the ticker in a request header (/api/scraper), still answers, marked as deprecated.
Data scraped from Investidor10 and may be delayed. Nothing here is investment advice.