---
name: "xpay-jina-sort-by-relevance"
description: "Rerank a list of documents by relevance to a query using Jina Reranker API. Use this when you have multiple documents and want to sort them by how well they match a specific query or topic. Perfect for document retrieval, content filtering, or finding the most relevant information from a collection."
version: "1.0.0"
price: "$0.01/call"
provider: "Jina AI"
---

# Sort By Relevance

Rerank a list of documents by relevance to a query using Jina Reranker API. Use this when you have multiple documents and want to sort them by how well they match a specific query or topic. Perfect for document retrieval, content filtering, or finding the most relevant information from a collection.

**Provider:** Jina AI
**Price:** $0.01/call
**Pricing model:** Flat rate per call

## When to Use

Use this tool when you need to rerank a list of documents by relevance to a query using jina reranker api. use this when you have multiple documents and want to sort them by how well they match a specific query or topic. perfect for document retrieval, content filtering, or finding the most relevant information from a collection.. This is part of the Jina AI provider on xpay✦.

## MCP Connection

Connect to xpay✦ to access this tool (and 19+ others):

```json
{
  "mcpServers": {
    "xpay": {
      "url": "https://mcp.xpay.sh/mcp?key=YOUR_API_KEY"
    }
  }
}
```

For Claude Code:
```bash
claude mcp add --transport http xpay "https://mcp.xpay.sh/mcp?key=YOUR_API_KEY"
```

## How to Execute

Use the xpay✦ meta-tools to run this tool:

1. **`xpay_details`** — Get full input schema: `xpay_details("jina/sort_by_relevance")`
2. **`xpay_run`** — Execute: `xpay_run("jina/sort_by_relevance", { ...inputs })`

## Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `documents` | array | Yes | Array of document texts to rerank by relevance |
| `top_n` | number | No | Maximum number of top results to return |
| `query` | string | Yes | The query or topic to rank documents against (e.g., 'machine learning algorithms', 'climate change solutions') |

## Pricing

- **Cost:** $0.01/call
- **Balance check:** Use `xpay_balance` to check remaining credits
- Get your API key at [xpay.tools](https://xpay.tools/account/settings/api-keys/) — $5 free credits included

## Related Skills

- [Jina AI (all tools)](https://xpay.tools/skills/jina/SKILL.md) — 20 tools
- [Show Api Key](https://xpay.tools/skills/jina/show-api-key/SKILL.md) — $0.01/call
- [Primer](https://xpay.tools/skills/jina/primer/SKILL.md) — $0.01/call
- [Guess Datetime Url](https://xpay.tools/skills/jina/guess-datetime-url/SKILL.md) — $0.01/call
- [Capture Screenshot Url](https://xpay.tools/skills/jina/capture-screenshot-url/SKILL.md) — $0.01/call
- [Read Url](https://xpay.tools/skills/jina/read-url/SKILL.md) — $0.01/call

## Links

- Tool page: https://xpay.tools/jina/sort-by-relevance/
- Provider: https://xpay.tools/jina/
- All tools: https://xpay.tools/explore
