You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/image-url.jpg?q=api&page=13&format=json
For typeahead suggestions, use the /typeahead
endpoint:
https://codesearch.val.run/typeahead?q=api
Returns an array of strings in format "username" or "username/projectName"
Found 13052 results for "api"(1009ms)
89const fetchJobs = async () => {
90try {
91const response = await fetch('/api/jobs');
92if (!response.ok) throw new Error('Failed to fetch jobs');
93jobs = await response.json();
126
127try {
128const response = await fetch('/api/jobs', {
129method: 'POST',
130headers: { 'Content-Type': 'application/json' },
172const fetchChatMessages = async () => {
173try {
174const response = await fetch('/api/chat');
175if (!response.ok) throw new Error('Failed to fetch chat messages');
176const newMessages = await response.json();
201
202try {
203const response = await fetch('/api/chat', {
204method: 'POST',
205headers: { 'Content-Type': 'application/json' },
3839// Mount routes
40app.route("/api/jobs", jobRoutes);
41app.route("/api/chat", chatRoutes);
42app.route("/", staticRoutes);
43