From 632d8f8bc6760ded0689c5ddc159d855e560e011 Mon Sep 17 00:00:00 2001
From: Haydn Ewers <27211+haydn@users.noreply.github.com>
Date: Mon, 11 Aug 2025 15:52:25 +1000
Subject: [PATCH] improve README
---
README.md | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/README.md b/README.md
index db47b80..2ef0c0a 100644
--- a/README.md
+++ b/README.md
@@ -3,19 +3,18 @@
Use CSS selectors to grab lists of stuff from various websites and list them altogether on a single
page.
-
## API
-Accepts a `GET` request like this:
+Request:
```
-https://harvestor.particlesystem.com/api?url=https://example.com&itemSelector=.item
+GET https://harvestor.particlesystem.com/api?url=https://example.com&itemSelector=.item
```
> [!NOTE]
> For readability the params in the example above have not been correctly encoded.
-And returns a JSON response like this:
+Response:
```json
{
@@ -40,10 +39,15 @@ And returns a JSON response like this:
### Params
-| Name | Description |
-|------|-------------|
-| `itemFilter` | A string an item's text content must contain to be included in the result. |
-| `itemSelector` | **Required** A CSS selector used to identify the items on the page. |
-| `linkSelector` | A CSS selector used to identify an `` element within each item that has a href attribute to be used as a link. |
-| `titleSelector` | A CSS selector used to identify an element containing the title of an item. If omitted, the title will be all the text content of the item. |
-| `url` | **Required** A URL of a page to scrape. |
+Required:
+
+- `url` — A URL of a page to scrape.
+- `itemSelector` — A CSS selector used to identify the items on the page.
+
+Optional:
+
+- `itemFilter` — A string an item's text content must contain to be included in the result.
+- `linkSelector` — A CSS selector used to identify an `` element within each item that has a href
+ attribute to be used as a link. If the item itself is an `` element, this param can be omitted.
+- `titleSelector` — A CSS selector used to identify an element containing the title of an item. If
+ omitted, the title will be all the text content of the item.
--
2.51.2