oeis.org APIoeis.org ↗
Search and retrieve integer sequences from the On-Line Encyclopedia of Integer Sequences. Look up by A-number, keyword, or known terms. 4 endpoints.
curl -X GET 'https://api.parse.bot/scraper/970d2964-672b-4fa3-ac30-0a50d22952e0/search_sequences?limit=10&query=fibonacci&offset=0' \ -H 'X-API-Key: $PARSE_API_KEY'
Search for sequences by keyword, A-number, or other terms. Returns summary information about matching sequences. Note: OEIS returns empty results for overly broad queries (e.g. 'prime') that match too many sequences; use more specific terms (e.g. 'prime gap', 'twin prime') or A-numbers for best results.
| Param | Type | Description |
|---|---|---|
| limit | integer | Maximum number of results to return. |
| queryrequired | string | Search query (keywords, A-number like A000045, or sequence description). Overly broad terms may return empty results due to OEIS query limits. |
| offset | integer | Starting position for pagination. |
{
"type": "object",
"fields": {
"limit": "integer, limit used",
"query": "string, the search query submitted",
"total": "integer, number of results returned",
"offset": "integer, offset used",
"results": "array of sequence summaries with a_number, id, name, data, comment_count, reference_count, link_count, has_formula, has_example"
},
"sample": {
"data": {
"limit": 10,
"query": "fibonacci",
"total": 10,
"offset": 0,
"results": [
{
"id": "M0692 N0256",
"data": "0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181",
"name": "Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1.",
"a_number": "A000045",
"link_count": 250,
"has_example": true,
"has_formula": true,
"comment_count": 179,
"reference_count": 59
}
]
},
"status": "success"
}
}About the oeis.org API
The OEIS API provides 4 endpoints for searching and retrieving integer sequences from the On-Line Encyclopedia of Integer Sequences. Use search_sequences to find entries by keyword or A-number, get_sequence to pull full metadata for a specific entry including formulas, comments, and author, get_sequence_data to retrieve raw indexed term pairs from a sequence's b-file, and search_by_sequence to identify an unknown sequence from its known values.
Search and Lookup
The search_sequences endpoint accepts a query string — a keyword phrase, a description fragment, or a direct A-number like A000045 — and returns an array of sequence summaries. Each summary includes a_number, name, data (the initial comma-separated terms), and metadata counts: comment_count, reference_count, link_count, has_formula, and has_example. Pagination is controlled via limit and offset. Note that overly broad queries such as prime return empty results; use specific phrases like prime gap or twin prime instead.
Full Sequence Detail
The get_sequence endpoint takes an a_number — either the full form A000045 or a bare integer like 45, which is automatically zero-padded — and returns the complete OEIS entry. Response fields include name, data, formula (array of formula strings), comment (array of annotation strings), example, link (HTML link strings), author, keyword, offset, and the legacy id codes. This is the right endpoint when you need the mathematical context around a sequence, not just its terms.
Raw Term Data
The get_sequence_data endpoint returns structured term data in b-file format: an array of objects each containing an integer index n and its corresponding value a(n). The optional num_terms parameter caps the number of returned terms; omitting it returns all available terms for the sequence. The response also includes a_number in canonical form and total_terms as a count.
Identify a Sequence from Its Terms
The search_by_sequence endpoint accepts a comma-separated string of known values — for example 1,1,2,3,5,8,13 — and returns matching sequence summaries in the same shape as search_sequences results, including a_number, name, data, and availability flags. This is useful when you have computed values and need to identify the underlying mathematical sequence.
- Identify an unknown integer sequence by supplying its first several terms to
search_by_sequence - Build a math reference tool that fetches full entry detail — formulas, comments, and examples — via
get_sequence - Extract all indexed term pairs for a sequence using
get_sequence_datato populate a local numerical dataset - Search for sequences related to a mathematical concept using keyword queries in
search_sequences - Look up a known A-number programmatically to retrieve author attribution and keyword classification
- Cross-reference computed sequence values against OEIS entries to validate a new integer formula
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does OEIS have an official developer API?+
fmt=json parameter is included, but it is not documented as a formal developer API and has no official versioning, authentication, or support channel.Why does my `search_sequences` query return empty results?+
prime or number trigger this behavior. Use more specific phrases such as prime gap, Sophie Germain prime, or Fibonacci divisibility to get results. The total field in the response will be 0 when this occurs.What does `get_sequence_data` return that `get_sequence` does not?+
get_sequence returns the data field as a short comma-separated string of initial terms. get_sequence_data returns the full b-file content as a structured array of {n, a(n)} integer pairs, potentially covering thousands of terms. Use num_terms to limit the response to a specific count.Does the API expose cross-references between sequences?+
get_sequence endpoint does return comment and link arrays that may contain cross-reference mentions in text or HTML form, but there is no dedicated xref array or parsed list of related A-numbers in the response schema. You can fork this API on Parse and revise it to extract and surface the cross-reference data as a structured field.Is it possible to filter `search_sequences` results by keyword tags like `base`, `nonn`, or `fini`?+
search_sequences endpoint accepts a free-text query and does not expose a dedicated keyword filter parameter. The keyword field is returned on individual entries via get_sequence. You can fork this API on Parse and revise it to add keyword-based filtering as an explicit input parameter.