Sign inTry it

Search Swift packages.

Searches the Swift Package Index like its search page: package name, GitHub owner/repository, one-line description, star count and package page link. First results page only. Returns an empty list when nothing matches.

No reports yetRead-only, no login
Site
Swift Package Index, United States
Version
v1
Runs, last 7 days
No reports yet
sha256
465e8315c67a…

Run it with your agent

after installing Wield

Ask in plain words. Your agent finds this recipe and calls it:

“Search Swift packages.”

Read-only: it changes nothing on the site. No login needed.

{
  "tool": "run",
  "arguments": {
    "recipe_id": "swiftpackageindex.com/search-packages",
    "params": {
      "query": "networking"
    }
  }
}

Requests

sent from your browser, in order
  1. 1GET/search?querySwift Package Index search page /search?query=…; read-only GET. Packages are li elements of ul#package-list, each a link to the package page with name, identifier, description and stars.

Parameters

from your agent
querystringrequiredPackage name, keyword or feature, e.g. 'networking', 'markdown', 'charts'

Returns

to your agent
packagesobject[]description, name, repository, stars, url
querystring

Where it can send

  • swiftpackageindex.com

Anything else is blocked by the extension.

Reads from your session

Nothing. Your browser attaches the site's cookies by itself.

Used only in requests to the addresses on the left. Never sent to wield.run or your agent.

Checks

a run passes when
  • length(output.packages) > `0`
  • length(output.packages[?starts_with(url, 'https://swiftpackageindex.com/')]) == length(output.packages)
  • length(output.packages[?name != `null`]) == length(output.packages)
  • length(output.packages[?repository != `null`]) > `0`

Raw recipe

Served as canonical JSON from /api/v1/recipes/swiftpackageindex.com/search-packages, so its sha256 matches the ETag and the index.

Check it yourself
curl -s https://wield.run/api/v1/recipes/swiftpackageindex.com/search-packages | shasum -a 256
# 465e8315c67a807a9a7727d54a9fd59ca4822c0ee3674a1f7ef8ce7290d3f470
swiftpackageindex.com/search-packages.json, v1
{
  "description": "Searches the Swift Package Index like its search page: package name, GitHub owner/repository, one-line description, star count and package page link. First results page only. Returns an empty list when nothing matches.",
  "effect": "read",
  "id": "swiftpackageindex.com/search-packages",
  "keywords": [
    "swift",
    "swift package index",
    "swiftpackageindex",
    "swiftpm",
    "package",
    "packages",
    "library",
    "libraries",
    "ios",
    "macos",
    "github",
    "spm",
    "dependency",
    "framework"
  ],
  "output": {
    "schema": {
      "properties": {
        "packages": {
          "items": {
            "properties": {
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": "string"
              },
              "repository": {
                "description": "GitHub owner/repository, e.g. 'Alamofire/Alamofire'",
                "type": [
                  "string",
                  "null"
                ]
              },
              "stars": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "url": {
                "type": "string"
              }
            },
            "required": [
              "name",
              "url"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "query": {
          "type": "string"
        }
      },
      "required": [
        "query",
        "packages"
      ],
      "type": "object"
    },
    "value": "{query: params.query, packages: steps.search.packages[?name != `null` && href != `null`].{name: name, repository: identifier || `null`, description: description || `null`, stars: (stars && to_number(replace(split(stars, ' ')[0], ',', ''))) || `null`, url: join('', ['https://swiftpackageindex.com', href])}}"
  },
  "params": {
    "additionalProperties": false,
    "properties": {
      "query": {
        "description": "Package name, keyword or feature, e.g. 'networking', 'markdown', 'charts'",
        "maxLength": 100,
        "minLength": 2,
        "type": "string"
      }
    },
    "required": [
      "query"
    ],
    "type": "object"
  },
  "provenance": {
    "method": "har",
    "notes": "GET /search?query=<query> answers 200 HTML. The matching packages are li items in ul#package-list: a link to /owner/repo with h4 name, p description, li.identifier and li.stars. The page uses the bare host; the www host redirects to the home page, so the origin is swiftpackageindex.com.",
    "recorded_at": "2026-11-08T16:22:40.000Z",
    "recorded_by": "wield-forge (claude-haiku agent)"
  },
  "requires_login": false,
  "schema": "https://wield.run/schema/recipe/v1.json",
  "site": {
    "country": "US",
    "id": "swiftpackageindex.com",
    "language": "en",
    "name": "Swift Package Index",
    "origin": "https://swiftpackageindex.com",
    "origins": [
      "https://swiftpackageindex.com"
    ]
  },
  "steps": [
    {
      "description": "Swift Package Index search page /search?query=…; read-only GET. Packages are li elements of ul#package-list, each a link to the package page with name, identifier, description and stars.",
      "expect": {
        "assert": "status == `200` && contains(body, 'package-results')",
        "content_type": "html",
        "status": [
          200
        ]
      },
      "extract": {
        "html_items": {
          "packages": {
            "fields": {
              "description": {
                "selector": "p"
              },
              "href": {
                "attr": "href",
                "selector": "a"
              },
              "identifier": {
                "selector": "li.identifier small"
              },
              "name": {
                "selector": "h4"
              },
              "stars": {
                "selector": "li.stars small"
              }
            },
            "max": 50,
            "selector": "#package-list > li"
          }
        }
      },
      "id": "search",
      "request": {
        "headers": {
          "Accept": "text/html"
        },
        "method": "GET",
        "query": {
          "query": "{{params.query}}"
        },
        "url": "/search"
      }
    }
  ],
  "task": "Search Swift packages",
  "tos": {
    "notes": "Not reviewed. One search page per call, the same page a visitor loads. The site's terms on automated access were not checked.",
    "reviewed": false
  },
  "verify": {
    "checks": [
      "length(output.packages) > `0`",
      "length(output.packages[?starts_with(url, 'https://swiftpackageindex.com/')]) == length(output.packages)",
      "length(output.packages[?name != `null`]) == length(output.packages)",
      "length(output.packages[?repository != `null`]) > `0`"
    ],
    "example_params": {
      "query": "networking"
    },
    "max_ms": 5000
  },
  "version": 1
}