You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/image-url.jpg%20%22Optional%20title%22?q=image&page=8&format=json
For typeahead suggestions, use the /typeahead
endpoint:
https://codesearch.val.run/typeahead?q=image
Returns an array of strings in format "username" or "username/projectName"
Found 6491 results for "image"(649ms)
156>
157<img
158src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSIGEJA8-xL8Aa9oC7Y7gFqBoICxvhebGig6ADUJYSFVEzWRD0Y5GmuhnjW6B6e11C07iE&usqp=CAU"
159alt="EEP Portal Logo"
160style={{
680<meta charset="UTF-8">
681<style>${css}</style>
682<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>📰</text></svg>">
683</head>
684<body>
82};
8384const imageUrl = $("meta[property='og:image']").attr("content");
85if (imageUrl) {
86console.log("Fetching image for URL:", imageUrl);
87const imgResponse = await fetchWithRetry(imageUrl);
88const contentType = imgResponse.headers.get("content-type");
89console.log("Image content type:", contentType);
9091if (!contentType || !contentType.startsWith("image/")) {
92console.error("Invalid image MIME type or missing content type:", contentType);
93return null;
94}
109};
110} else {
111console.warn("Failed to upload image blob or retrieve blob reference.");
112}
113} else {
114console.warn("No og:image found for URL:", url);
115}
116