# Replicate Search Scraper (`yourapiservice/replicate-search-scraper`)

Search Replicate's models and collections easily!

- **URL**: https://beta-securitybyobscurity.apify.com/yourapiservice/replicate-search-scraper.md
- **Developed by:** [Your API Service](https://beta-securitybyobscurity.apify.com/yourapiservice) (community)
- **Categories:** Developer tools, Automation, AI
- **Stats:** 2 total users, 2 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

$7.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.
You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

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

# README

### What does Replicate Search Scraper do?

The Replicate Search Scraper allows you to scrape search results from Replicate.com based on a specified search query and entity types. It scrapes the data and provides it in structured formats such as JSON, which you can use in your own reports, spreadsheets, and applications. Replicate Search Scraper allows you to scrape:

- Search results from Replicate.com.
- Detailed information about each result, including title, description, categories, and more.

### Why use Replicate Search Scraper?

Replicate Search Scraper simplifies the process of obtaining search results from Replicate.com by automating the scraping tasks. Instead of manually searching and extracting data, this tool handles it for you, saving time and ensuring you get exactly what you need.

### How to use Replicate Search Scraper

- Specify the search query you want to scrape.
- Customize the results with entity type filters.
- The scraper will generate the results according to your specifications and provide you with the data.

### Input parameters

If this actor is run on the Apify platform, our simple interface will help you configure all the necessary and optional parameters of this scraper before running it. This scraper recognizes the following input parameters:

- **searchQuery** - The search term to scrape.
- **entityTypes** - List of entity types to scrape. If empty, all entity types will be scraped.

Example:

```json
{
    "searchQuery": "recraft-20b",
    "entityTypes": [
        "models",
        "collections"
    ]
}
```

### Output

The output from Replicate Search Scraper is stored in a dataset. Each item contains information about a search result. Here's an example of some of the output you would get if you used the input parameters above to scrape the search query "recraft-20b":

```json
{
    "models": [
        {
            "description": "Affordable and fast images",
            "name": "recraft-20b",
            "owner_avatar": {
                "kind": "organization",
                "url": "https://github.com/recraft-ai.png"
            },
            "username": "recraft-ai",
            "run_count": "21.6K",
            "latest_enabled_version_id": "4441c81fea73ada6fcba2efef13b37b567894c18666120a534d0f34a96a40ee1",
            "hardware": "cpu",
            "is_official_model": true
        },
        {
            "description": "Recraft V3 (code-named red_panda) is a text-to-image model with the ability to generate long texts, and images in a wide list of styles. As of today, it is SOTA in image generation, proven by the Text-to-Image Benchmark by Artificial Analysis",
            "name": "recraft-v3",
            "owner_avatar": {
                "kind": "organization",
                "url": "https://github.com/recraft-ai.png"
            },
            "username": "recraft-ai",
            "run_count": "503.9K",
            "latest_enabled_version_id": "e06217725b21e2c059a09b3f44b4aef56574173aee9976c9726bdc0f474d7f46",
            "hardware": "cpu",
            "is_official_model": true
        },
        {
            "description": "Affordable and fast vector images",
            "name": "recraft-20b-svg",
            "owner_avatar": {
                "kind": "organization",
                "url": "https://github.com/recraft-ai.png"
            },
            "username": "recraft-ai",
            "run_count": "1.1K",
            "latest_enabled_version_id": "110b949db40d2d140280a4484c8c70eca855128ad04c06a8a8a680701121110e",
            "hardware": "cpu",
            "is_official_model": true
        }...
    ]
}
```

### How much will scraping Replicate.com cost you?

When it comes to scraping, it can be challenging to estimate the resources needed to extract data as use cases may vary significantly. That's why the best course of action is to run a test scrape with a small sample of input data and limited output. You’ll get your price per scrape, which you’ll then multiply by the number of scrapes you intend to do.

### Integrations and Replicate Search Scraper

Last but not least, Replicate Search Scraper can be connected with almost any cloud service or web app thanks to integrations on the Apify platform. You can integrate with Make, Zapier, Slack, Airbyte, GitHub, Google Sheets, Google Drive, and more. Or you can use webhooks to carry out an action whenever an event occurs, e.g., get a notification whenever Replicate Search Scraper successfully finishes a run.

### Using Replicate Search Scraper with the Apify API

The Apify API gives you programmatic access to the Apify platform. The API is organized around RESTful HTTP endpoints that enable you to manage, schedule, and run Apify actors. The API also lets you access any datasets, monitor actor performance, fetch results, create and update versions, and more.

To access the API using Node.js, use the apify-client NPM package. To access the API using Python, use the apify-client PyPI package.

Check out the Apify API reference docs for full details or click on the API tab for code examples.

### Personal data

You should be aware that your results might contain personal data. Personal data is protected by GDPR in the European Union and other laws and regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers. You can read the basics of ethical web scraping in our blog post on the legality of web scraping.

#### Legal Considerations

Please note that this scraper is not associated with Replicate and is not intended for unauthorized use. Please read Replicate's Terms of Service before scraping their website. Make sure you are not violating their Terms of Service. The data scraped is for educational and research purposes only.

### Your feedback

We’re always working on improving the performance of our Actors. So if you’ve got any technical feedback for Replicate Search Scraper or simply found a bug, please create an issue on the Actor’s Issues tab in Apify Console.

# Actor input Schema

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

Search term to scrape

## `entityTypes` (type: `array`):

List of entity types to scrape. If empty, all entity types will be scraped.

## Actor input object example

```json
{
  "searchQuery": "recraft-20b",
  "entityTypes": [
    "models"
  ]
}
```

# 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 = {
    "entityTypes": [
        "models"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("yourapiservice/replicate-search-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 = { "entityTypes": ["models"] }

# Run the Actor and wait for it to finish
run = client.actor("yourapiservice/replicate-search-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 '{
  "entityTypes": [
    "models"
  ]
}' |
apify call yourapiservice/replicate-search-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Replicate Search Scraper",
        "description": "Search Replicate's models and collections easily!",
        "version": "0.0",
        "x-build-id": "fDu4VjRTkCcHEgpUj"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/yourapiservice~replicate-search-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-yourapiservice-replicate-search-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/yourapiservice~replicate-search-scraper/runs": {
            "post": {
                "operationId": "runs-sync-yourapiservice-replicate-search-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/yourapiservice~replicate-search-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-yourapiservice-replicate-search-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": {
                    "searchQuery": {
                        "title": "Search",
                        "minLength": 1,
                        "type": "string",
                        "description": "Search term to scrape",
                        "default": "recraft-20b"
                    },
                    "entityTypes": {
                        "title": "Entity Types",
                        "type": "array",
                        "description": "List of entity types to scrape. If empty, all entity types will be scraped.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "models",
                                "collections"
                            ],
                            "enumTitles": [
                                "Models",
                                "Collections"
                            ]
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
