REST API
Use the REST API when you want yfin from curl, a backend service, a serverless function, a browser runtime, or an AI tool.
Base URL
https://api.yfin.dev
OpenAPI
https://api.yfin.dev/v1/openapi.json
Use the API Reference for an interactive endpoint browser.
Identity
Anonymous calls work without signup. For higher public limits, send a contact identity:
curl "https://api.yfin.dev/v1/quote?symbols=AAPL,MSFT" \
-H "X-Yfin-Contact: you@example.com"
High-volume users can email sam@yfin.dev for an API key and send it as a
Bearer token:
curl "https://api.yfin.dev/v1/quote?symbols=AAPL,MSFT" \
-H "Authorization: Bearer yfin_..."
Response Envelope
Most successful responses include data and meta:
{
"data": {},
"meta": {
"route": "quote",
"generated_at": "2026-05-04T12:00:00.000Z"
}
}
Error responses include ok: false and an error object. See
Errors for status codes, retry behavior, and SDK exceptions.
Quotes
curl "https://api.yfin.dev/v1/quote?symbols=AAPL,MSFT" \
-H "X-Yfin-Contact: you@example.com"
History
curl "https://api.yfin.dev/v1/history?symbol=AAPL&period=5d&interval=1d" \
-H "X-Yfin-Contact: you@example.com"
Search
curl "https://api.yfin.dev/v1/search?q=apple" \
-H "X-Yfin-Contact: you@example.com"
Common Workflows
Raw Endpoint Calls
Use /v1/raw/{endpointId} when you want to call a supported endpoint by catalog
ID instead of using a named route. Most applications should start with named
routes and the API Reference.
curl "https://api.yfin.dev/v1/raw/v7.quote?symbols=AAPL,MSFT" \
-H "X-Yfin-Contact: you@example.com"