You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/$%7Burl%7D?q=react&page=16&format=json
For typeahead suggestions, use the /typeahead
endpoint:
https://codesearch.val.run/typeahead?q=react
Returns an array of strings in format "username" or "username/projectName"
Found 12832 results for "react"(608ms)
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useEffect } from "https://esm.sh/react@18.2.0?deps=react@18.2.0";
3import type { User, Book } from "../../shared/types.ts";
483};
8485const handleSearch = (e: React.FormEvent) => {
86e.preventDefault();
87loadBooks();
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import React, { useState, useEffect } from "https://esm.sh/react@18.2.0?deps=react@18.2.0";
3import type { User, Book } from "../../shared/types.ts";
471};
7273const handleSubmit = async (e: React.FormEvent) => {
74e.preventDefault();
75setLoading(true);