> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Database

> ScrapeGraphAI local sync: searchable entities, `.search()` filters, and operators.

The ScrapeGraphAI plugin syncs data locally. Use `corsair.scrapegraphai.db.<entity>.search({ data, limit?, offset? })` with the filters listed per entity.

<Info>
  **New to Corsair?** See [database operations](/concepts/database), [data synchronization](/concepts/integrations), and [multi-tenancy](/concepts/multi-tenancy).
</Info>

## Crawls

Path: `scrapegraphai.db.crawls.search`

```ts theme={null}
const rows = await corsair.scrapegraphai.db.crawls.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field        | Type     | Operators                                  |
| ------------ | -------- | ------------------------------------------ |
| `entity_id`  | `string` | equals, contains, startsWith, endsWith, in |
| `task_id`    | `string` | equals, contains, startsWith, endsWith, in |
| `request_id` | `string` | equals, contains, startsWith, endsWith, in |
| `status`     | `string` | equals, contains, startsWith, endsWith, in |
| `url`        | `string` | equals, contains, startsWith, endsWith, in |
| `error`      | `string` | equals, contains, startsWith, endsWith, in |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***

## Credits

Path: `scrapegraphai.db.credits.search`

```ts theme={null}
const rows = await corsair.scrapegraphai.db.credits.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field                | Type     | Operators                                  |
| -------------------- | -------- | ------------------------------------------ |
| `entity_id`          | `string` | equals, contains, startsWith, endsWith, in |
| `remaining_credits`  | `number` | equals, gt, gte, lt, lte, in               |
| `total_credits_used` | `number` | equals, gt, gte, lt, lte, in               |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***

## Generated Schemas

Path: `scrapegraphai.db.generatedSchemas.search`

```ts theme={null}
const rows = await corsair.scrapegraphai.db.generatedSchemas.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field            | Type     | Operators                                  |
| ---------------- | -------- | ------------------------------------------ |
| `entity_id`      | `string` | equals, contains, startsWith, endsWith, in |
| `request_id`     | `string` | equals, contains, startsWith, endsWith, in |
| `status`         | `string` | equals, contains, startsWith, endsWith, in |
| `user_prompt`    | `string` | equals, contains, startsWith, endsWith, in |
| `refined_prompt` | `string` | equals, contains, startsWith, endsWith, in |
| `error`          | `string` | equals, contains, startsWith, endsWith, in |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***

## Jobs

Path: `scrapegraphai.db.jobs.search`

```ts theme={null}
const rows = await corsair.scrapegraphai.db.jobs.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field        | Type     | Operators                                  |
| ------------ | -------- | ------------------------------------------ |
| `entity_id`  | `string` | equals, contains, startsWith, endsWith, in |
| `id`         | `string` | equals, contains, startsWith, endsWith, in |
| `status`     | `string` | equals, contains, startsWith, endsWith, in |
| `websiteUrl` | `string` | equals, contains, startsWith, endsWith, in |
| `updatedAt`  | `date`   | equals, before, after, between             |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***

## Markdownifies

Path: `scrapegraphai.db.markdownifies.search`

```ts theme={null}
const rows = await corsair.scrapegraphai.db.markdownifies.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field         | Type     | Operators                                  |
| ------------- | -------- | ------------------------------------------ |
| `entity_id`   | `string` | equals, contains, startsWith, endsWith, in |
| `request_id`  | `string` | equals, contains, startsWith, endsWith, in |
| `website_url` | `string` | equals, contains, startsWith, endsWith, in |
| `result`      | `string` | equals, contains, startsWith, endsWith, in |
| `error`       | `string` | equals, contains, startsWith, endsWith, in |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***

## Scheduled Jobs

Path: `scrapegraphai.db.scheduledJobs.search`

```ts theme={null}
const rows = await corsair.scrapegraphai.db.scheduledJobs.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field             | Type      | Operators                                  |
| ----------------- | --------- | ------------------------------------------ |
| `entity_id`       | `string`  | equals, contains, startsWith, endsWith, in |
| `id`              | `string`  | equals, contains, startsWith, endsWith, in |
| `user_id`         | `string`  | equals, contains, startsWith, endsWith, in |
| `job_name`        | `string`  | equals, contains, startsWith, endsWith, in |
| `service_type`    | `string`  | equals, contains, startsWith, endsWith, in |
| `cron_expression` | `string`  | equals, contains, startsWith, endsWith, in |
| `is_active`       | `boolean` | equals                                     |
| `created_at`      | `string`  | equals, contains, startsWith, endsWith, in |
| `updated_at`      | `string`  | equals, contains, startsWith, endsWith, in |
| `last_run_at`     | `string`  | equals, contains, startsWith, endsWith, in |
| `next_run_at`     | `string`  | equals, contains, startsWith, endsWith, in |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***

## Search Scrapers

Path: `scrapegraphai.db.searchScrapers.search`

```ts theme={null}
const rows = await corsair.scrapegraphai.db.searchScrapers.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field              | Type     | Operators                                  |
| ------------------ | -------- | ------------------------------------------ |
| `entity_id`        | `string` | equals, contains, startsWith, endsWith, in |
| `request_id`       | `string` | equals, contains, startsWith, endsWith, in |
| `user_prompt`      | `string` | equals, contains, startsWith, endsWith, in |
| `num_results`      | `number` | equals, gt, gte, lt, lte, in               |
| `markdown_content` | `string` | equals, contains, startsWith, endsWith, in |
| `error`            | `string` | equals, contains, startsWith, endsWith, in |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***

## Smart Scrapers

Path: `scrapegraphai.db.smartScrapers.search`

```ts theme={null}
const rows = await corsair.scrapegraphai.db.smartScrapers.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field         | Type     | Operators                                  |
| ------------- | -------- | ------------------------------------------ |
| `entity_id`   | `string` | equals, contains, startsWith, endsWith, in |
| `request_id`  | `string` | equals, contains, startsWith, endsWith, in |
| `website_url` | `string` | equals, contains, startsWith, endsWith, in |
| `user_prompt` | `string` | equals, contains, startsWith, endsWith, in |
| `error`       | `string` | equals, contains, startsWith, endsWith, in |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](/concepts/database).*

***
