You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/$%7BsvgDataUrl%7D?q=image&page=7&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 9932 results for "image"(1763ms)
1293cursor: pointer;
1294background-color: white;
1295background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
1296background-position: right 8px center;
1297background-repeat: no-repeat;
19date: string;
20doc: string;
21image: string;
22tags: string;
23title: string;
81sequences: item.sequences,
82date: item.date,
83image: item.image,
84backlinks: item.backlinks,
85category: extractPostCategory(item),
130(page.sequences?.length > 0 ? `- sequences: ${page.sequences.map(seq => `[Sequence ${seq.id} on ${seq.topic}](${SITE_URL}/sequences#${seq.id})`).join(", ")}` : null),
131(page.book ? `- book_id: ${page.book}` : null),
132(page.image ? `- image: ${page.image}` : null),
133(page.score ? `- relevance: ${page.score.toFixed(3)}` : null),
134].filter((a) => a !== null).join("\n");
332- sequences: a comma-separated set of markdown-formatted (title and URL) sequences that the post is part of, if any.
333- backklinks: a comma-separated set of post URLs that link to this post, if any.
334- image: the URL of the feature image associated with the post, if any.
335- relevance: a score indicating how relevant the post is to the search query, defaults to 1 if not present.
336- category: available categories are: blog, notes, exercise, replies, and page.`,