Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I need to access this page from an external site, but I'm having trouble.
https://recycle-appliances.com/search.json?q=severin
This is my code:
$.ajax({
url: 'https://recycle-appliances.com/search.json?q=severin',
type: "GET",
crossDomain: true,
contentType: "application/json; charset=utf-8",
dataType: "jsonp",
success: function (data) {
console.log(data);
}
});
This is the error:
Uncaught SyntaxError: Unexpected token '<' (at search.json?q=severin&callback=jQuery1124049738821019783397_1677420328616&_=1677420328617:1:1)
How can i fix this, i need help guys.
Where are you seeing search.json as being a valid AJAX endpoint? That is likely part of the problem - you're calling a storefront endpoint that doesn't exist. That store has the password page enabled so makes sense that a call to it's content would fail but that won't be the primary issue here.
Are you building a headless site? If so, pulling data from that kind of url doesn't make as much sense. The storefront api has a "products" query like:
products(first: 10, query: "search term") {
...
^ truncated for simplicity.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025