marksandspencer.com APImarksandspencer.com ↗
Access M&S UK food products, nutrition info, ingredients, allergens, and category listings via 4 structured endpoints.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/f50bd5ad-301e-4278-8cf4-a5ef67ba5897/get_food_catalogue_categories' \ -H 'X-API-Key: $PARSE_API_KEY'
Get the top-level food categories from the M&S food catalogue. Returns category names, URLs, and URL slugs that can be used with get_category_products.
No input parameters required.
{
"type": "object",
"fields": {
"categories": "array of objects with name, url, and slug for each food category"
},
"sample": {
"data": {
"categories": [
{
"url": "https://www.marksandspencer.com/food/l/fruit-and-vegetables",
"name": "Fruit & Vegetables",
"slug": "fruit-and-vegetables"
},
{
"url": "https://www.marksandspencer.com/food/l/meat",
"name": "Meat",
"slug": "meat"
},
{
"url": "https://www.marksandspencer.com/food/l/dairy",
"name": "Dairy",
"slug": "dairy"
}
]
},
"status": "success"
}
}About the marksandspencer.com API
The Marks & Spencer Food Catalogue API covers 4 endpoints that expose M&S UK food product data including category navigation, product listings, keyword search, and full product details. The get_product_details endpoint returns nutrition tables, ingredients, allergen information, storage instructions, and product images for any individual item. Category and search responses include product weight, brand, labels, and SEO URLs used to drill into product-level detail.
Category Navigation and Product Listings
The get_food_catalogue_categories endpoint returns the top-level food category tree — each entry includes a name, url, and slug. Those slugs feed directly into get_category_products, which accepts a required category_slug plus optional subcategory_slug and sub_subcategory_slug parameters to navigate up to three levels of hierarchy (for example, fruit-and-vegetables → fresh-fruit → berries-and-cherries). The listing response includes products, subcategories, filters, total_items, total_pages, and current_page for full pagination control.
Search and Product Discovery
search_food_products accepts a query string (e.g. 'milk', 'chocolate cake') and an optional page integer. Results mirror the listing shape: an array of product objects each carrying id, title, weight, brand, labels, seoUrl, and imageUrl. The search_term field in the response echoes back the query used, which is useful when logging or caching results.
Full Product Detail
get_product_details takes a product_id (the numeric segment from the seoUrl after fdp) and a product_slug. It returns the deepest data available: a nutrition object with a categories array and a values array, an ingredients string, a storage string, breadcrumbs for category context, labels such as 'Eat Well' or 'New In', and an images array. The ingredients field may be empty for unprocessed fresh produce where M&S does not publish ingredient declarations.
- Build a grocery comparison tool using
weight,brand, and nutrition data fromget_product_details. - Aggregate allergen and ingredient data across the M&S food range for dietary filtering apps.
- Crawl the full product catalogue hierarchically using
get_food_catalogue_categoriesthenget_category_productssubcategory slugs. - Power a meal-planning feature that displays calorie and macro data from the
nutritionresponse field. - Monitor product label changes (e.g. 'New In', 'Eat Well') across categories for market trend tracking.
- Index M&S food product images and descriptions for a visual search or product catalog application.
- Search for specific products by keyword with
search_food_productsand surface results with pricing context from a parallel data source.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Marks & Spencer have an official public developer API?+
What does `get_product_details` return beyond basic product info?+
nutrition object (with categories and values arrays), an ingredients string, storage instructions, labels, breadcrumbs, and an images array. The ingredients field may be empty for fresh unprocessed items where M&S does not publish an ingredients declaration.Does the API cover customer reviews or star ratings for M&S food products?+
Does the API return pricing for M&S food products?+
get_category_products and search_food_products include title, weight, brand, labels, and imageUrl, but not price fields. You can fork the API on Parse and revise it to add a pricing field to the product detail endpoint.How does pagination work across endpoints?+
get_category_products and search_food_products accept an optional page integer. Responses include current_page, total_pages, and total_items, so you can iterate through the full result set programmatically. get_food_catalogue_categories and get_product_details are single-response endpoints with no pagination.