Search RS Online UK. A browser loads uk.rs-online.com and the response is the product cards on that page.
Keyword, page 1
GET https://api.piloterr.com/v2/rsonline/search?query=connector
Page 2
GET https://api.piloterr.com/v2/rsonline/search?query=connector&page=2
| Parameter |
Type |
Required |
Default |
What to pass |
What changes in the JSON |
query |
string |
yes |
empty, which returns 400 |
A keyword such as connector, or a uk.rs-online.com search or category link |
A keyword builds /web/c/?searchTerm=.... Each card has price as a number and price_display as the pound string. A product link returns 400. |
page |
integer |
no |
omit for page 1 |
An integer from 1 |
Page 2 sets pn=2, sets pagination.page to 2, and returns the next cards. pagination.next is that next URL, or null on the last page. |
return_page_source |
boolean |
no |
false |
true or false |
true replaces results and pagination with result, the rendered HTML. |
price is the numeric pound amount. price_display is the printed string, such as £4.95. A trailing dash is removed. rs_stock_number is the RS stock code.
- Find a connector by keyword
- Page through a category
- Collect brand, manufacturer part, and the pound price
| Code |
Meaning |
| 400 |
Empty query, another website, a product link, or a page below 1 |
| 404 |
The page had no products |
| 500 |
The fetch failed |