# OEIS Integer Sequences Scraper (`parseforge/oeis-integer-sequences-scraper`) Actor

Export integer sequences from the Online Encyclopedia of Integer Sequences (OEIS) with 370k+ entries. Search by A-number, keyword, or sequence values. Pull sequence terms, formulas, references, authors, cross-references, and program code.

- **URL**: https://apify.com/parseforge/oeis-integer-sequences-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Education, Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $9.00 / 1,000 result items

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

![ParseForge Banner](https://github.com/ParseForge/apify-assets/blob/ad35ccc13ddd068b9d6cba33f323962e39aed5b2/banner.jpg?raw=true)

## 🔢 OEIS Integer Sequences Scraper

> 🚀 **Export integer sequences from the OEIS in seconds.** Search **370,000+ sequences** by A-number, keyword, or matching terms. Pull terms, formulas, references, authors, cross-references, and program code (Maple, Mathematica, Python, more).

> 🕒 **Last updated:** 2026-05-22 · **📊 22 fields** per record · **🔢 370,000+ sequences** · **🧠 OEIS Foundation source** · **💻 Multi-language programs**

The **OEIS Integer Sequences Scraper** taps the Online Encyclopedia of Integer Sequences, the canonical reference for integer sequences in mathematics. Maintained since 1964 by Neil Sloane and the OEIS Foundation, the database now indexes **more than 370,000 sequences**, each curated with terms, formulas, generating functions, references, code, and cross-links.

This Actor returns **22 structured fields per record**, including the A-number, name, full numeric data, term array, offset, keywords, author, creation and revision dates, comments, references, links, formulas, examples, Maple and Mathematica snippets, multi-language program code, and cross-references to related sequences.

| 🎯 Target Audience | 💡 Primary Use Cases |
|---|---|
| Mathematicians, ML feature engineers, programmers, combinatorialists, recreational math fans, educators, puzzle designers | Pattern recognition, sequence identification, code generation reference, OEIS-grounded LLM features, ML training data, problem-set curation |

---

### 📋 What the OEIS Integer Sequences Scraper does

Flexible OEIS search syntax in a single Actor:

- 🔢 **A-number lookup.** `id:A000045` returns Fibonacci.
- 📛 **Keyword search.** `fibonacci`, `prime`, `partition`, `permutation`.
- 🧮 **Match by terms.** Paste a comma-separated sequence (`1,1,2,3,5,8`) and OEIS finds matching entries.
- 🏷️ **Filter by keywords.** Combine with OEIS-curated tags like `core`, `easy`, `nice`, `tabl`, `nonn`.
- 🧑‍🔬 **Author filter.** `author:Sloane` narrows to entries by a specific contributor.

Each record includes the A-number, sequence values (string and parsed array), offset, OEIS keywords, author byline, creation and revision dates, prose comments, bibliographic references, hyperlinks, mathematical formulas, worked examples, Maple/Mathematica/program code, and cross-references to related A-numbers.

> 💡 **Why it matters:** OEIS is the de facto authority for "what sequence is this?" Building your own client means crawling HTML, parsing free-text fields, and handling Sloane's idiosyncratic flat-file format. This Actor delivers a tidy schema with terms already parsed into an array.

---

### 🎬 Full Demo

_🚧 Coming soon: a 3-minute walkthrough showing how to go from sign-up to a downloaded dataset._

---

### ⚙️ Input

<table>
<thead>
<tr><th>Input</th><th>Type</th><th>Default</th><th>Behavior</th></tr>
</thead>
<tbody>
<tr><td>maxItems</td><td>integer</td><td>10</td><td>Records to return. Free plan caps at 10, paid plan at 1,000,000.</td></tr>
<tr><td>searchQuery</td><td>string</td><td>"fibonacci"</td><td>Native OEIS search syntax (A-number, keyword, terms, or combined query).</td></tr>
<tr><td>keywords</td><td>string[]</td><td>[]</td><td>Optional list of OEIS keyword filters (intersected with searchQuery).</td></tr>
</tbody>
</table>

**Example: pull the Fibonacci sequence by A-number.**

```json
{
    "maxItems": 1,
    "searchQuery": "id:A000045"
}
````

**Example: find essential ("core") sequences related to primes.**

```json
{
    "maxItems": 20,
    "searchQuery": "prime",
    "keywords": ["core", "nice"]
}
```

**Example: identify a mystery sequence by matching terms.**

```json
{
    "maxItems": 5,
    "searchQuery": "1,1,2,3,5,8,13,21"
}
```

> ⚠️ **Good to Know:** OEIS search returns results in paginated batches. The Actor paginates automatically and respects polite request pacing so you avoid being rate-limited.

***

### 📊 Output

Each record contains **22 fields**. Download the dataset as CSV, Excel, JSON, or XML.

#### 🧾 Schema

| Field | Type | Example |
|---|---|---|
| 🆔 `aNumber` | string | `"A000045"` |
| 🔢 `number` | integer | `45` |
| 🏷️ `name` | string | `"Fibonacci numbers: F(n) = F(n-1) + F(n-2)..."` |
| 🧾 `data` | string | `"0,1,1,2,3,5,8,13,21,34,55,89,144,..."` |
| 📊 `terms` | number\[] | `[0, 1, 1, 2, 3, 5, 8, 13, 21, 34]` |
| 📐 `offset` | string | null | `"0,3"` |
| 🏷️ `keywords` | string\[] | null | `["core", "nonn", "easy", "nice"]` |
| 👤 `author` | string | null | `"N. J. A. Sloane"` |
| 🕒 `createdDate` | ISO 8601 | null | `"1991-05-19T00:00:00.000Z"` |
| 🕓 `revisedDate` | ISO 8601 | null | `"2026-05-20T00:00:00.000Z"` |
| 💬 `comment` | string\[] | null | `["F(n+2) = F(n+1) + F(n).", ...]` |
| 📚 `reference` | string\[] | null | `["Knuth, TAOCP Vol. 1, ...", ...]` |
| 🔗 `link` | string\[] | null | `["https://oeis.org/A000045/b000045.txt", ...]` |
| ➕ `formula` | string\[] | null | `["F(n) = (phi^n - (-phi)^(-n))/sqrt(5).", ...]` |
| 🧮 `example` | string\[] | null | `["F(5) = 5.", ...]` |
| 🟣 `maple` | string\[] | null | `["A000045 := proc(n) ... end:"]` |
| 🟠 `mathematica` | string\[] | null | `["Table[Fibonacci[n], {n, 0, 30}]"]` |
| 💻 `program` | string\[] | null | `["(Python) def fib(n): ...", "(Haskell) ..."]` |
| 🔗 `xref` | string\[] | null | `["A000032", "A001690", ...]` |
| 🌐 `url` | string | `"https://oeis.org/A000045"` |
| 🕓 `scrapedAt` | ISO 8601 | `"2026-05-22T00:00:00.000Z"` |
| ⚠️ `error` | string | null | `null` |

#### 📦 Sample records

<details>
<summary><strong>🌀 Fibonacci sequence (A000045)</strong></summary>

```json
{
    "aNumber": "A000045",
    "number": 45,
    "name": "Fibonacci numbers: F(n) = F(n-1) + F(n-2) with F(0) = 0 and F(1) = 1.",
    "data": "0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765",
    "terms": [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765],
    "offset": "0,3",
    "keywords": ["core", "nonn", "easy", "nice", "hear", "look", "changed"],
    "author": "N. J. A. Sloane",
    "createdDate": "1991-05-19T00:00:00.000Z",
    "revisedDate": "2026-05-20T00:00:00.000Z",
    "comment": ["F(n+2) = number of binary sequences of length n with no two consecutive 1's."],
    "reference": ["D. E. Knuth, The Art of Computer Programming, Vol. 1, Section 1.2.8."],
    "link": ["https://oeis.org/A000045/b000045.txt"],
    "formula": ["F(n) = (phi^n - (-phi)^(-n))/sqrt(5), where phi = (1+sqrt(5))/2."],
    "example": ["F(5) = 5, F(10) = 55."],
    "maple": ["A000045 := proc(n) combinat[fibonacci](n) end:"],
    "mathematica": ["Table[Fibonacci[n], {n, 0, 30}]"],
    "program": ["(Python) def fib(n): return n if n < 2 else fib(n-1) + fib(n-2)"],
    "xref": ["A000032", "A001690", "A005478"],
    "url": "https://oeis.org/A000045",
    "scrapedAt": "2026-05-22T00:00:00.000Z"
}
```

</details>

<details>
<summary><strong>🔢 Prime numbers (A000040)</strong></summary>

```json
{
    "aNumber": "A000040",
    "number": 40,
    "name": "The prime numbers.",
    "data": "2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71",
    "terms": [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71],
    "offset": "1,1",
    "keywords": ["core", "nonn", "easy", "nice"],
    "author": "N. J. A. Sloane",
    "createdDate": "1991-04-21T00:00:00.000Z",
    "revisedDate": "2026-05-15T00:00:00.000Z",
    "comment": ["A natural number greater than 1 with no positive divisors other than 1 and itself."],
    "reference": ["G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers."],
    "link": ["https://oeis.org/A000040/b000040.txt"],
    "formula": ["a(n) ~ n * log(n)."],
    "example": null,
    "maple": ["A000040 := proc(n) ithprime(n) end:"],
    "mathematica": ["Prime[Range[100]]"],
    "program": ["(Python) from sympy import prime; [prime(n) for n in range(1, 101)]"],
    "xref": ["A000720", "A007097"],
    "url": "https://oeis.org/A000040",
    "scrapedAt": "2026-05-22T00:00:00.000Z"
}
```

</details>

***

### ✨ Why choose this Actor

| | Capability |
|---|---|
| 🔢 | **370,000+ sequences.** The complete, continuously updated OEIS catalog. |
| 🧮 | **Multi-mode search.** A-number, keyword, matching terms, author, OEIS keyword filters. |
| 📊 | **Parsed term arrays.** Numeric `terms[]` ready for analysis, alongside raw `data` string. |
| 💻 | **Multi-language code.** Maple, Mathematica, Python, Haskell, PARI/GP, Sage, and more. |
| 🔗 | **Cross-references.** Every entry links to related sequences via `xref`. |
| ⚡ | **Fast.** 100 sequences in under a minute. |
| 🔁 | **Always fresh.** Every run hits the live OEIS feed. |

> 📊 OEIS is the canonical reference for integer sequences and is cited by mathematicians, programmers, and AI researchers worldwide.

***

### 📈 How it compares to alternatives

| Approach | Cost | Coverage | Refresh | Filters | Setup |
|---|---|---|---|---|---|
| **⭐ OEIS Integer Sequences Scraper** *(this Actor)* | $5 free credit, then pay-per-use | **370,000+ sequences** | **Live per run** | A-number, keyword, terms, OEIS tags | ⚡ 2 min |
| Manual OEIS website browsing | Free | Per-query | Manual | Web form | 🐢 Hours |
| Hand-coded OEIS client | Free | Full | Per-build | Custom | ⏳ Days |
| Static OEIS data dump | Free | Snapshot | Periodic | None | 🕒 Variable |

Pick this Actor when you want live search, parsed terms, and zero parser work.

***

### 🚀 How to use

1. 📝 **Sign up.** [Create a free account with $5 credit](https://console.apify.com/sign-up?fpr=vmoqkp) (takes 2 minutes).
2. 🌐 **Open the Actor.** Go to the OEIS Integer Sequences Scraper page on the Apify Store.
3. 🎯 **Set input.** Enter an A-number, keyword, or term list and optional keyword filters.
4. 🚀 **Run it.** Click **Start** and let the Actor collect your data.
5. 📥 **Download.** Grab your results in the **Dataset** tab as CSV, Excel, JSON, or XML.

> ⏱️ Total time from signup to downloaded dataset: **3-5 minutes.** No coding required.

***

### 💼 Business use cases

<table>
<tr>
<td width="50%" valign="top">

#### 🧠 ML and AI feature engineering

- Generate training data for sequence-prediction models
- Build benchmarks for mathematical reasoning LLMs
- Ground retrieval-augmented systems with OEIS records
- Test code-generation models against curated programs

</td>
<td width="50%" valign="top">

#### 🔢 Mathematics and research

- Identify mystery sequences from partial terms
- Discover related sequences via cross-references
- Pull formulas and references for papers
- Curate problem sets for teaching combinatorics

</td>
</tr>
<tr>
<td width="50%" valign="top">

#### 💻 Programming and tooling

- Build "what is this sequence?" developer tools
- Generate code-completion snippets from OEIS programs
- Power competitive-programming hint engines
- Seed unit tests with canonical sequences

</td>
<td width="50%" valign="top">

#### 🎓 Education

- Build interactive math lessons around OEIS examples
- Curate sequence-pattern puzzles for students
- Source historical context from author attributions
- Cross-language code teaching with Maple/Mathematica/Python

</td>
</tr>
</table>

***

### 🔌 Automating OEIS Integer Sequences Scraper

Control the scraper programmatically for scheduled runs and pipeline integrations:

- 🟢 **Node.js.** Install the `apify-client` NPM package.
- 🐍 **Python.** Use the `apify-client` PyPI package.
- 📚 See the [Apify API documentation](https://docs.apify.com/api/v2) for full details.

The [Apify Schedules feature](https://docs.apify.com/platform/schedules) lets you trigger this Actor on any cron interval. Weekly refreshes keep downstream search indices in sync automatically.

***

### 🌟 Beyond business use cases

Data like this powers more than commercial workflows. The same structured records support research, education, civic projects, and personal initiatives.

<table>
<tr>
<td width="50%">

#### 🎓 Research and academia

- Thesis projects in combinatorics and number theory
- Reproducible math papers with cited OEIS pulls
- Course datasets for discrete-math and algorithms classes
- Open-science notebooks grounded in OEIS records

</td>
<td width="50%">

#### 🎨 Personal and creative

- Hobbyist math blogs and YouTube explainers
- Visualization projects on sequence behavior
- Puzzle and recreational-math content
- Generative art driven by integer sequences

</td>
</tr>
<tr>
<td width="50%">

#### 🤝 Non-profit and civic

- Open educational resources for under-served schools
- Math-olympiad training material curation
- Public-interest visualizations of numerical patterns
- Citizen-math outreach and clubs

</td>
<td width="50%">

#### 🧪 Experimentation

- Train sequence-completion ML models
- Benchmark LLMs on math reasoning with OEIS labels
- Prototype agent pipelines that identify sequences
- Build LLM-grounded math assistants with cited entries

</td>
</tr>
</table>

***

### 🤖 Ask an AI assistant about this scraper

Open a ready-to-send prompt about this ParseForge actor in the AI of your choice:

- 💬 [**ChatGPT**](https://chat.openai.com/?q=How%20do%20I%20use%20the%20OEIS%20Integer%20Sequences%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🧠 [**Claude**](https://claude.ai/new?q=How%20do%20I%20use%20the%20OEIS%20Integer%20Sequences%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🔍 [**Perplexity**](https://perplexity.ai/search?q=How%20do%20I%20use%20the%20OEIS%20Integer%20Sequences%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🅒 [**Copilot**](https://copilot.microsoft.com/?q=How%20do%20I%20use%20the%20OEIS%20Integer%20Sequences%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)

***

### ❓ Frequently Asked Questions

#### 🧩 How does it work?

Enter a search query using native OEIS syntax (A-number, keyword, comma-separated terms, or a combined expression), optionally add keyword filters, and click Start. The Actor paginates results and emits one structured record per sequence.

#### 📏 How accurate is the data?

Records mirror the live OEIS feed. OEIS is curated by Neil Sloane and a global volunteer editorial board, with every change peer-reviewed before publication.

#### 🔁 How often is the dataset refreshed?

OEIS is updated daily as editors approve new sequences and revisions. Every Actor run reflects the current OEIS state.

#### 🔍 Can I identify a sequence from just a few terms?

Yes. Paste the terms as a comma-separated query (e.g. `1,1,2,3,5,8`) and OEIS returns matching sequences ranked by relevance.

#### ⏰ Can I schedule regular runs?

Yes. Use Apify Schedules to run this Actor on any cron interval and keep a downstream search index in sync.

#### ⚖️ Is this data legal to use?

OEIS publishes under a Creative Commons license. Review the specific CC terms for the sequences you use, but most reuse is permitted with attribution.

#### 💼 Can I use this data commercially?

Generally yes, subject to the OEIS Creative Commons license. Attribute the OEIS Foundation when you redistribute or build derivative works.

#### 💳 Do I need a paid Apify plan to use this Actor?

No. The free Apify plan is enough for testing and small runs (10 records per run). A paid plan lifts the limit and gives you access to scheduling, higher concurrency, and larger datasets.

#### 🔁 What happens if a run fails or gets interrupted?

Apify automatically retries transient errors. If a run still fails, you can inspect the log in the Runs tab, fix the input, and re-run. Partial datasets from failed runs are preserved so you never lose progress.

#### 🆘 What if I need help?

Our support team is here to help. Contact us through the Apify platform or use the Tally form linked below.

***

### 🔌 Integrate with any app

OEIS Integer Sequences Scraper connects to any cloud service via [Apify integrations](https://apify.com/integrations):

- [**Make**](https://docs.apify.com/platform/integrations/make) - Automate multi-step workflows
- [**Zapier**](https://docs.apify.com/platform/integrations/zapier) - Connect with 5,000+ apps
- [**Slack**](https://docs.apify.com/platform/integrations/slack) - Get run notifications in your channels
- [**Airbyte**](https://docs.apify.com/platform/integrations/airbyte) - Pipe sequence data into your warehouse
- [**GitHub**](https://docs.apify.com/platform/integrations/github) - Trigger runs from commits and releases
- [**Google Drive**](https://docs.apify.com/platform/integrations/drive) - Export datasets straight to Sheets

You can also use webhooks to trigger downstream actions when a run finishes. Push fresh OEIS records into your product backend, or alert your team in Slack.

***

### 🔗 Recommended Actors

- [**🔬 ArXiv Scraper**](https://apify.com/parseforge/arxiv-scraper) - Preprint research papers in math and CS
- [**📊 Figshare Scraper**](https://apify.com/parseforge/figshare-scraper) - Open research datasets
- [**📚 PubMed Scraper**](https://apify.com/parseforge/pubmed-scraper) - Biomedical literature
- [**🧪 PubChem Compound Scraper**](https://apify.com/parseforge/pubchem-compound-scraper) - NIH chemical database
- [**🌐 OSF Scraper**](https://apify.com/parseforge/osf-scraper) - Open Science Framework registry

> 💡 **Pro Tip:** browse the complete [ParseForge collection](https://apify.com/parseforge) for more reference-data scrapers.

***

**🆘 Need Help?** [**Open our contact form**](https://tally.so/r/BzdKgA) to request a new scraper, propose a custom data project, or report an issue.

***

> **⚠️ Disclaimer:** this Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by the OEIS Foundation, Neil Sloane, or any editorial board member. All trademarks mentioned are the property of their respective owners. Only publicly available open data is collected.

# Actor input Schema

## `maxItems` (type: `integer`):

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000.

## `searchQuery` (type: `string`):

Free-text search across the sequence index. Multi-word queries are AND-matched. Use 'id:A000045' to pull a single sequence by A-number.

## `aNumbers` (type: `array`):

Exact A-number list (e.g. 'A000045', 'A000040'). Overrides searchQuery when set.

## `keywords` (type: `array`):

Keyword filter (all selected keywords must match). Enabling this automatically turns on Fetch Details.

## `author` (type: `string`):

Case-insensitive author substring match (e.g. 'Sloane'). Enabling this automatically turns on Fetch Details.

## `sortBy` (type: `string`):

Order of returned sequences. 'a\_number\_asc' = lowest A-number first. 'a\_number\_desc' = highest first. 'relevance' = best name match first.

## `fetchDetails` (type: `boolean`):

Add comments, references, formulas, programs, keywords, and author for each match. Adds 1 fetch per item.

## `extendedTerms` (type: `boolean`):

Replace 'terms' with the full extended term list (hundreds to thousands vs the default ~80). Adds 1 fetch per item.

## Actor input object example

```json
{
  "maxItems": 10,
  "searchQuery": "fibonacci",
  "sortBy": "a_number_asc",
  "fetchDetails": false,
  "extendedTerms": false
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxItems": 10,
    "searchQuery": "fibonacci"
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/oeis-integer-sequences-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "maxItems": 10,
    "searchQuery": "fibonacci",
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/oeis-integer-sequences-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "maxItems": 10,
  "searchQuery": "fibonacci"
}' |
apify call parseforge/oeis-integer-sequences-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=parseforge/oeis-integer-sequences-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "OEIS Integer Sequences Scraper",
        "description": "Export integer sequences from the Online Encyclopedia of Integer Sequences (OEIS) with 370k+ entries. Search by A-number, keyword, or sequence values. Pull sequence terms, formulas, references, authors, cross-references, and program code.",
        "version": "1.0",
        "x-build-id": "svHivTihAVdE9dR8m"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/parseforge~oeis-integer-sequences-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-parseforge-oeis-integer-sequences-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/parseforge~oeis-integer-sequences-scraper/runs": {
            "post": {
                "operationId": "runs-sync-parseforge-oeis-integer-sequences-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/parseforge~oeis-integer-sequences-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-parseforge-oeis-integer-sequences-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 1000000,
                        "type": "integer",
                        "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000."
                    },
                    "searchQuery": {
                        "title": "Search Query",
                        "type": "string",
                        "description": "Free-text search across the sequence index. Multi-word queries are AND-matched. Use 'id:A000045' to pull a single sequence by A-number."
                    },
                    "aNumbers": {
                        "title": "A-Number List",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Exact A-number list (e.g. 'A000045', 'A000040'). Overrides searchQuery when set.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "keywords": {
                        "title": "Filter by Keywords",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Keyword filter (all selected keywords must match). Enabling this automatically turns on Fetch Details.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "core",
                                "nice",
                                "easy",
                                "hard",
                                "more",
                                "less",
                                "look",
                                "nonn",
                                "sign",
                                "frac",
                                "cons",
                                "base",
                                "bref",
                                "cofr",
                                "tabl",
                                "tabf",
                                "fini",
                                "full",
                                "new",
                                "obsc",
                                "uned",
                                "mult",
                                "changed",
                                "word",
                                "dumb",
                                "eigen",
                                "rec",
                                "loda",
                                "dead",
                                "hear",
                                "allocated",
                                "allocating"
                            ]
                        }
                    },
                    "author": {
                        "title": "Filter by Author",
                        "type": "string",
                        "description": "Case-insensitive author substring match (e.g. 'Sloane'). Enabling this automatically turns on Fetch Details."
                    },
                    "sortBy": {
                        "title": "Sort Order",
                        "enum": [
                            "a_number_asc",
                            "a_number_desc",
                            "relevance"
                        ],
                        "type": "string",
                        "description": "Order of returned sequences. 'a_number_asc' = lowest A-number first. 'a_number_desc' = highest first. 'relevance' = best name match first.",
                        "default": "a_number_asc"
                    },
                    "fetchDetails": {
                        "title": "Fetch Details",
                        "type": "boolean",
                        "description": "Add comments, references, formulas, programs, keywords, and author for each match. Adds 1 fetch per item.",
                        "default": false
                    },
                    "extendedTerms": {
                        "title": "Extended Terms",
                        "type": "boolean",
                        "description": "Replace 'terms' with the full extended term list (hundreds to thousands vs the default ~80). Adds 1 fetch per item.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
