Vai al contenuto principale

Documentation Index

Fetch the complete documentation index at: https://docs.olostep.com/llms.txt

Use this file to discover all available pages before exploring further.

Panoramica

Questa guida dimostra come utilizzare l’endpoint Batches di Olostep per recuperare dati dai popolari strumenti di ricerca AI, tra cui Google AI Mode, Gemini, Microsoft Copilot, ChatGPT, Perplexity e Google AI Overview. Sfruttando parser specializzati per ogni piattaforma, puoi estrarre risultati di ricerca strutturati su larga scala, rendendolo ideale per:
  • Raccolta di informazioni competitive
  • Confronto dei risultati di ricerca su più piattaforme
  • Monitoraggio dei motori di ricerca AI

Formulazione della Richiesta

Passo 1: Prepara le Tue Query

Crea un array di query che vuoi cercare. Per questa demo, cercheremo notizie in diverse città:
const axios = require('axios');

// Configurazione
const CONFIG = {
  url: 'https://api.olostep.com/v1/batches',
  token: 'YOUR_API_KEY_HERE'
};

// Demo: Genera query per diverse città
const BASE_QUERY = 'what is the news today in';
const CITIES = [
  'New York', 'Los Angeles', 'Chicago', 'Houston', 'Phoenix',
  'Philadelphia', 'San Antonio', 'San Diego', 'Dallas', 'San Jose'
];

Passo 2: Genera Elementi per Ogni Strumento AI

Ogni strumento di ricerca AI richiede un ID parser specifico e una struttura URL. Di seguito sono riportate le funzioni di generazione degli elementi per ciascuna piattaforma:
ID Parser: @olostep/google-aimode-results
const generateAIModeItems = () => {
  return CITIES.map((city, index) => {
    const query = `${BASE_QUERY} ${city}`;
    const encodedQuery = encodeURIComponent(query);
    return {
      url: `https://google.com/aimode?q=${encodedQuery}`,
      custom_id: (index + 1).toString()
    };
  });
};

Passo 3: Invia la Richiesta Batch

Invia la tua richiesta batch con gli elementi generati:
const response = await axios.post(CONFIG.url, {
  parser: { id: '@olostep/gemini-results' },
  items: generateGeminiItems()
}, {
  headers: {
    'Authorization': `Bearer ${CONFIG.token}`,
    'Content-Type': 'application/json'
  }
});

const batchId = response.data.id;
Nota: Dopo l’invio, controlla il completamento per recuperare i risultati.

Formato della Risposta

Dopo aver inviato una richiesta batch e controllato il completamento, riceverai risposte nel seguente formato:
{
  "url": "https://www.google.com//search?q=what+is+the+news+today+in+Austin&hl=en&udm=50&aep=11&newwindow=1&sei=mt_oaPvDBrKh5NoPy9W1sQE&mstk=AUtExfANCngr4KIDEH7t1EJsJ3xHfdsjka647_hz7r0UJWh1VM4FhWV9j1f2QOy0ylJU2l9-zWCxfORo5WzWeAN52_oVMM7nGAgEIRdyzsjtT7h1qhBn8Qj2RiN8HFQke6uYjmqnTeR4O1opgHbiLdAe5ZNfkzDyE_9O2zE&csuir=1",
  "prompt": "what is the news today in Austin",
  "answer_markdown": "In Austin news, officials announced that progress has been made on the city's homelessness response \n\n.  \n\n**Top story: Homelessness**  \n\n* Austin officials and local advocates reported \"real, measurable progress\" in addressing the needs of the city's homeless population.\n* The announcement came ahead of a report from the Ending Community Homelessness Coalition (ECHO)... ",
  "sources": [
    {
      "url": "https://www.kxan.com/video/austin-mayor-citys-decreased-homelessness-is-a-big-deal/11151402/#:~:text=Elected%20city%20and%20county%20officials%2C%20along%20with,experiencing%20homelessness%20in%20Austin.%20Read%20More:%20https://www.kxan.com/news/local/austin/echo%2Dto%2Dpresent%2Dreport%2Don%2Dstate%2Dof%2Daustins%2Dhomelessness%2Dresponse%2Dsystem/",
      "title": "KXAN\n·",
      "description": "Austin mayor: City's decreased homelessness is 'a big deal'",
      "icon": null,
      "domain": "https://www.kxan.com",
      "cited": true
    },
    {
      "url": "https://www.fox7austin.com/tag/us/tx/travis-county/austin/east-austin#:~:text=Austin%20pd%20arrests%20man%20in%20deadly%20east%20austin%20double%20shooting",
      "title": "FOX 7 Austin",
      "description": "East Austin",
      "icon": null,
      "domain": "https://www.fox7austin.com",
      "cited": true
    },
    ...
  ],
  "country": null
}
Esempi di risposta completi:

Prezzi e Matrice di Geolocalizzazione

La seguente tabella illustra il supporto per la ricerca specifica per paese e i crediti consumati da ciascun parser.
CaratteristicaGoogle AI ModeChatGPTPerplexityGoogle AI OverviewGeminiMicrosoft CopilotGrok
Paese Supportato
Limite Dimensione Batch2500250025002500250010001000
Crediti3533333

Verifica dei Paesi Supportati

Utilizza il seguente endpoint per recuperare l’elenco dei paesi supportati per ciascun parser:
GET https://api.olostep.com/v1/countries?service=batches&parser={parser_id}
Esempio di Richiesta:
curl "https://api.olostep.com/v1/countries?service=batches&parser=@olostep/perplexity-results"
Manca qualcosa? Contatta info@olostep.com per supporto o assistenza per implementazioni personalizzate.