# pub.chive.import.search

> Published by [chive.pub](https://lexicon.garden/identity/did:plc:7natp5xae72bddaqlkef2t4e)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.import.search)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.import.search/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.import.search/examples)

## Definitions

### `pub.chive.import.search`

**Type**: `query`

Search imported eprints in the AppView cache

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `limit` | `integer` | No | Maximum results to return |
| `query` | `string` | No | Search query for title, abstract, or author |
| `cursor` | `string` | No | Pagination cursor |
| `source` | `string` | No | Filter by external source identifier |
| `authorName` | `string` | No | Filter by author name |
| `authorOrcid` | `string` | No | Filter by author ORCID |
| `claimStatus` | `string` | No | Filter by claim status |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cursor` | `string` | No | Cursor for next page |
| `eprints` | `array` | Yes | List of matching imported eprints |
| `hasMore` | `boolean` | Yes | Whether more results are available |

### `pub.chive.import.search#externalAuthor`

**Type**: `object`

An author from an external source

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | Yes | Author name |
| `email` | `string` | No | Email address |
| `orcid` | `string` | No | ORCID identifier |
| `affiliation` | `string` | No | Institutional affiliation |

### `pub.chive.import.search#importedEprint`

**Type**: `object`

An eprint imported from an external source

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | `integer` | Yes | Internal import ID |
| `doi` | `string` | No | DOI if assigned |
| `url` | `string` (uri) | Yes | URL to the eprint on the external source |
| `title` | `string` | Yes | Eprint title |
| `pdfUrl` | `string` (uri) | No | URL to PDF |
| `source` | `string` | Yes | External source identifier |
| `authors` | `array` | Yes | Author list |
| `abstract` | `string` | No | Abstract text |
| `claimedAt` | `string` (datetime) | No | When the eprint was claimed |
| `categories` | `array` | No | Subject categories |
| `externalId` | `string` | Yes | Source-specific identifier |
| `importedAt` | `string` (datetime) | Yes | When the eprint was imported |
| `syncStatus` | `string` | Yes | Current sync status |
| `claimStatus` | `string` | Yes | Current claim status |
| `canonicalUri` | `string` (at-uri) | No | AT-URI of the canonical record if claimed |
| `claimedByDid` | `string` (did) | No | DID of the user who claimed this eprint |
| `lastSyncedAt` | `string` (datetime) | No | When the eprint was last synced |
| `publicationDate` | `string` (datetime) | No | Publication date |
| `importedByPlugin` | `string` | Yes | Plugin that imported this eprint |

## Raw Schema

```json
{
  "id": "pub.chive.import.search",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "eprints",
            "hasMore"
          ],
          "properties": {
            "cursor": {
              "type": "string",
              "description": "Cursor for next page"
            },
            "eprints": {
              "type": "array",
              "items": {
                "ref": "#importedEprint",
                "type": "ref"
              },
              "description": "List of matching imported eprints"
            },
            "hasMore": {
              "type": "boolean",
              "description": "Whether more results are available"
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "properties": {
          "limit": {
            "type": "integer",
            "default": 50,
            "maximum": 100,
            "minimum": 1,
            "description": "Maximum results to return"
          },
          "query": {
            "type": "string",
            "description": "Search query for title, abstract, or author"
          },
          "cursor": {
            "type": "string",
            "description": "Pagination cursor"
          },
          "source": {
            "type": "string",
            "maxLength": 50,
            "minLength": 2,
            "description": "Filter by external source identifier"
          },
          "authorName": {
            "type": "string",
            "description": "Filter by author name"
          },
          "authorOrcid": {
            "type": "string",
            "description": "Filter by author ORCID"
          },
          "claimStatus": {
            "type": "string",
            "description": "Filter by claim status",
            "knownValues": [
              "unclaimed",
              "pending",
              "claimed"
            ]
          }
        }
      },
      "description": "Search imported eprints in the AppView cache"
    },
    "externalAuthor": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "Author name"
        },
        "email": {
          "type": "string",
          "description": "Email address"
        },
        "orcid": {
          "type": "string",
          "description": "ORCID identifier"
        },
        "affiliation": {
          "type": "string",
          "description": "Institutional affiliation"
        }
      },
      "description": "An author from an external source"
    },
    "importedEprint": {
      "type": "object",
      "required": [
        "id",
        "source",
        "externalId",
        "url",
        "title",
        "authors",
        "importedByPlugin",
        "importedAt",
        "syncStatus",
        "claimStatus"
      ],
      "properties": {
        "id": {
          "type": "integer",
          "description": "Internal import ID"
        },
        "doi": {
          "type": "string",
          "description": "DOI if assigned"
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "URL to the eprint on the external source"
        },
        "title": {
          "type": "string",
          "description": "Eprint title"
        },
        "pdfUrl": {
          "type": "string",
          "format": "uri",
          "description": "URL to PDF"
        },
        "source": {
          "type": "string",
          "description": "External source identifier"
        },
        "authors": {
          "type": "array",
          "items": {
            "ref": "#externalAuthor",
            "type": "ref"
          },
          "description": "Author list"
        },
        "abstract": {
          "type": "string",
          "description": "Abstract text"
        },
        "claimedAt": {
          "type": "string",
          "format": "datetime",
          "description": "When the eprint was claimed"
        },
        "categories": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Subject categories"
        },
        "externalId": {
          "type": "string",
          "description": "Source-specific identifier"
        },
        "importedAt": {
          "type": "string",
          "format": "datetime",
          "description": "When the eprint was imported"
        },
        "syncStatus": {
          "type": "string",
          "description": "Current sync status",
          "knownValues": [
            "active",
            "stale",
            "unavailable"
          ]
        },
        "claimStatus": {
          "type": "string",
          "description": "Current claim status",
          "knownValues": [
            "unclaimed",
            "pending",
            "claimed"
          ]
        },
        "canonicalUri": {
          "type": "string",
          "format": "at-uri",
          "description": "AT-URI of the canonical record if claimed"
        },
        "claimedByDid": {
          "type": "string",
          "format": "did",
          "description": "DID of the user who claimed this eprint"
        },
        "lastSyncedAt": {
          "type": "string",
          "format": "datetime",
          "description": "When the eprint was last synced"
        },
        "publicationDate": {
          "type": "string",
          "format": "datetime",
          "description": "Publication date"
        },
        "importedByPlugin": {
          "type": "string",
          "description": "Plugin that imported this eprint"
        }
      },
      "description": "An eprint imported from an external source"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 1
}
```
