# UniProt Bacterial Protein Records - By Taxon, Per Record (`nexgensignal/uniprot-bacterial-protein-records`) Actor

UniProtKB bacterial protein entries (taxonomy\_id:2) as clean per-record data - accession, protein/gene names, organism, taxonomic lineage, function and keywords. ~74.2M total, partition required. No author fields. CC BY 4.0, $0.05 per record.

- **URL**: https://apify.com/nexgensignal/uniprot-bacterial-protein-records.md
- **Developed by:** [NexGen Signal](https://apify.com/nexgensignal) (community)
- **Categories:** Business, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $33.50 / 1,000 bacterial protein records

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## UniProt Bacterial Protein Records - By Taxon, Per Record

Every bacterial protein in UniProtKB - each UniProtKB entry under the **Bacteria** superkingdom
(`taxonomy_id:2`) - as one clean, flat record: accession, protein and gene names, organism, taxonomic
lineage, function summary and keywords. Reproduced verbatim from the UniProt REST API, values unmodified,
no literature-author or contact field ever read.

### What one record represents

The source is **UniProt** (the UniProtKB REST API), filtered to `taxonomy_id:2` - the Bacteria superkingdom.
Each record is **one protein entry**: its primary accession and entry name, the recommended protein name,
gene name(s), organism and NCBI taxonomy id, the taxonomic lineage, whether the entry is reviewed
(Swiss-Prot) or unreviewed (TrEMBL), the protein-existence evidence level, a function summary and the UniProt
keywords.

### Coverage and volume

The live bacterial set is **74,201,400 UniProtKB entries** (measured at build time from the API's
`x-total-results`). Because that is far too large for a single pull, a **partition is required**: you supply
a UniProt query fragment - `reviewed:true` (Swiss-Prot bacteria), a genus or species taxonomy id such as
`taxonomy_id:1279` (Staphylococcus) or `taxonomy_id:562` (E. coli) - and the Actor AND-s it onto
`taxonomy_id:2`. The full-set figure is the capacity line; you always work within a partition.

**Sol's Wave-3 index put this door at about 74,117,227 records; measured live at build time the bacterial set
is 74,201,400 - the live figure is what this listing quotes.**

The Actor pages the UniProt REST API using its cursor (the `Link` header's `rel="next"`), 500 entries at a
time, and stops as soon as your **Maximum records** cap is met.

### Distinctness from the other UniProt cells

Bacteria and human are disjoint clades, so this cell shares **zero** records with the human-proteome cell.
About **337,294** bacterial entries are reviewed (Swiss-Prot) and so also appear in the reviewed-protein cell;
the reviewed cell is all organisms, this one is Bacteria only, so they overlap exactly on reviewed bacterial
entries and nowhere else. The enzyme cell overlaps only on bacterial enzymes. Stating these boundaries means
the cells combine without double-counting.

### Licence and attribution

UniProt data is released under **Creative Commons Attribution 4.0 (CC BY 4.0)** - free to use and
redistribute with attribution. The full notice travels on every record:

> UniProt (UniProtKB), CC BY 4.0. Attribution required; reproduced from the UniProt REST API, values unmodified. No literature-author, submitter or contact field is read.

The required attribution - `UniProt Consortium (https://www.uniprot.org)` - is present on every record.

### Person-data policy

This Actor requests **only** protein, gene, organism and function fields. UniProt's literature-references
section with author and submitter names is **never requested and never delivered**, and a per-record
assertion rejects any author, submitter or contact field (verified with a planted-field test). No
natural-person data is processed.

### Interpretation caveat

UniProtKB entries under the Bacteria superkingdom (taxonomy\_id:2): accession, protein/gene names, organism, lineage, function and keywords. The full bacterial set is ~74.2M entries, so a partition (reviewed:true, a genus/species taxon id) is required and AND-ed onto taxonomy\_id:2. Disjoint from the human cell; ~337,294 are reviewed.

Values are reproduced verbatim from the API; the Actor never rewrites a field. The `function` field is the
first UniProt function comment, which may cite PubMed identifiers - those are literature references, not
author names. The `taxonomic_lineage` lets you filter or group within Bacteria without a second query.

### Data quality and freshness

`reviewed` is a real boolean and `organism_id` a real number. Delivery is keyed on the stable accession, so
the dataset is safe to diff, deduplicate or upsert. Every run re-reads the live API, so the data is as fresh
as UniProt publishes, and each record's `observed_at` stamp dates the snapshot. The run's `RUN_RECEIPT`
records the partition, the API's total result count, and how many records were delivered and charged.

### Provenance and compliance

Every run reads `rest.uniprot.org/robots.txt` at runtime; the gate result (URL, status, byte length, SHA-256
of the policy) is written to the run's `RUN_RECEIPT`, and the search path is confirmed crawlable before any
data request. The API is keyless. The Actor never bypasses a block or fetches through a mirror.

### Inputs

- **Partition** (`partition`, required) - a UniProt query fragment AND-ed onto `taxonomy_id:2`. Prefilled
  with `reviewed:true`.
- **Maximum records** (`maxRecords`) - hard cap on protein records delivered and billed within the partition.

### Output

Records land in the Actor's default dataset and export as JSON, CSV, Excel or via the Apify API. A tabular
**overview view** surfaces accession, entry name, protein and gene names, organism, review status,
protein-existence and keywords.

### Fields in detail

The record leads with `accession` and `entry_name`, then `protein_name`, `gene_names`, `organism`,
`organism_id`, `taxonomic_lineage`, the boolean `reviewed` (and the verbatim `entry_type`),
`protein_existence`, `function` and `keywords`. The provenance block closes every record. Because the
accession is UniProt's stable primary key, this dataset joins cleanly onto any system that references UniProt
accessions, and onto the fleet's other UniProt cells.

### Typical uses

Bioprocess, antimicrobial-resistance and microbiome teams use this cell to assemble a bacterial protein
reference for a target clade - a genus, a species, or the reviewed Swiss-Prot core - as one flat table,
without parsing UniProt's nested JSON. Because the taxonomy id and lineage are first-class fields, the dataset
joins onto strain collections, AMR gene panels and metagenomic pipelines. A scheduled run per partition keeps
a downstream reference current with UniProt's release cycle, and the stable accession key makes it safe to
upsert.

### Scaling and limits

Set **Maximum records** low to sample cheaply or high to pull a full partition. The Actor pages the API with
its cursor (500 entries per request) and delivers incrementally, so memory stays flat regardless of how many
records you request, and you are billed only for what is delivered. The cursor is stable across a run, so even
a large partition proceeds without gaps or duplicates. Choose the partition to match your question - a single
species, a genus, or reviewed-only - and re-run to keep the reference current.

### Working with the Bacteria scope

The Bacteria superkingdom is enormous and overwhelmingly unreviewed, so the partition is where the work
happens. For a curated core, `reviewed:true` gives the ~337,000 Swiss-Prot bacterial entries - hand-checked,
richly annotated, and small enough to pull whole. For a single organism, a species taxonomy id
(`taxonomy_id:1280` for Staphylococcus aureus, `taxonomy_id:562` for E. coli) narrows to that clade including
its unreviewed entries. The `taxonomic_lineage` field on every record lets you filter or group within a pull
without a second query - collect by phylum, class or genus after the fact. Because the accession is stable and
the lineage travels on the row, a bacterial reference assembled here upserts cleanly and re-groups without
re-fetching.

### Why the partition is required

A door of 74 million records is not a single dataset you pull once; it is a corpus you query. Making the
partition a required input is a deliberate guard - it stops an accidental full-corpus run and forces the buyer
to name the clade or the review status they actually want, which is nearly always a few thousand to a few
hundred thousand records rather than tens of millions. The full-set figure stands as the capacity line so you
know the ceiling, but every run is scoped, bounded and billed only for what it delivers.

### Sibling Actors

It sits beside the fleet's UniProt reviewed-protein, human-proteome, enzyme and disease-annotation records - the same door at different scopes. It shares its engineering - the runtime robots gate, cursor paging, push-then-charge
billing and verbatim-value discipline - with the fleet's other UniProt records Actors, from which it stays
distinct by its Bacteria scope and taxonomic lineage.

# Actor input Schema

## `partition` (type: `string`):

Required. A UniProt query fragment AND-ed onto taxonomy\_id:2 to keep the slice tractable (the full bacterial set is ~74.2M). Examples: reviewed:true (Swiss-Prot bacteria), taxonomy\_id:1279 (Staphylococcus), taxonomy\_id:562 (E. coli).

## `maxRecords` (type: `integer`):

Maximum enzyme records delivered and billed within the partition. You are billed only for records delivered.

## Actor input object example

```json
{
  "partition": "reviewed:true",
  "maxRecords": 500
}
```

# Actor output Schema

## `results` (type: `string`):

The delivered UniProt bacterial protein record.

# 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 = {
    "partition": "reviewed:true",
    "maxRecords": 500
};

// Run the Actor and wait for it to finish
const run = await client.actor("nexgensignal/uniprot-bacterial-protein-records").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 = {
    "partition": "reviewed:true",
    "maxRecords": 500,
}

# Run the Actor and wait for it to finish
run = client.actor("nexgensignal/uniprot-bacterial-protein-records").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "partition": "reviewed:true",
  "maxRecords": 500
}' |
apify call nexgensignal/uniprot-bacterial-protein-records --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nexgensignal/uniprot-bacterial-protein-records"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/XEQ0bfxdgtlL0up7v/builds/R1rD3AHbbJ1bnJAEf/openapi.json
