# Oeis — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search OEIS for integer sequences by keyword, A-number, or known terms, then retrieve full sequence entries and b-file term data.

**Category:** Education | **Website:** [oeis.org/](https://oeis.org/) | **Docs:** [parse.bot/marketplace/3f8f8d20-4d27-4a8c-898e-9d0b7d372fbc/oeis-org-api](https://parse.bot/marketplace/3f8f8d20-4d27-4a8c-898e-9d0b7d372fbc/oeis-org-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-oeis-org-api-3f8f8d20/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_sequence

Point-lookup of a single OEIS sequence by its A-number. Returns the full record: name, initial terms, comments, references, links, formulas, examples, keywords, and author. Numeric-only input is auto-prefixed with 'A' and zero-padded.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `a_number` | string | Yes | OEIS A-number (e.g., A000045 or 45). Numeric-only input is automatically prefixed with 'A' and zero-padded. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-oeis-org-api-3f8f8d20/get_sequence \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"a_number":"<string>"}'
```

### get_sequence_data

Retrieve raw computed terms for a sequence in b-file format (index-value pairs). Returns an array of {n, a(n)} objects for each computed term. Optionally limit the number of terms returned.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `a_number` | string | Yes | OEIS A-number (e.g., A000045 or 45). Numeric-only input is automatically prefixed with 'A' and zero-padded. |
| `num_terms` | integer | No | Limit number of terms to return. Omitting returns all available terms. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-oeis-org-api-3f8f8d20/get_sequence_data \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"a_number":"<string>","num_terms":"<integer>"}'
```

### search_by_sequence

Identify sequences by providing known terms as a comma-separated string. Delegates to the OEIS search engine with the values as the query. Useful for identifying a sequence when you know some of its terms.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of results to return. |
| `sequence` | string | Yes | Comma-separated sequence values (e.g., 1,1,2,3,5,8,13). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-oeis-org-api-3f8f8d20/search_by_sequence \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","sequence":"<string>"}'
```

### search_sequences

Full-text search over OEIS sequences by keyword, A-number, or description. Returns summary information (A-number, name, initial terms, counts of comments/references/links, presence of formula/example) for each match. Paginates via offset. OEIS returns empty results for overly broad queries matching too many sequences; use specific terms or A-numbers.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Maximum number of results to return. |
| `offset` | integer | No | Starting position for pagination. |
| `query` | string | Yes | Search query: keywords, A-number like A000045, or sequence description. Overly broad terms may return empty results due to OEIS query limits. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-oeis-org-api-3f8f8d20/search_sequences \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","offset":"<integer>","query":"<string>"}'
```
