> ## Documentation Index
> Fetch the complete documentation index at: https://docs.veritus.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Start

> Get started with the Veritus Search API

## Base URL

The base URL for all API endpoints is:

```
https://discover.veritus.ai/api
```

## Complete Workflow: Check Credits, Create Job, and Check Status

<CodeGroup>
  ```bash curl theme={null}
  # Step 1: Check your credit balance
  # See: /learn/search-api/user-credits
  curl -X GET "https://discover.veritus.ai/api/v1/user/getCredits" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```python python theme={null}
  import requests

  # Step 1: Check your credit balance
  # See: /learn/search-api/user-credits
  response = requests.get(
      "https://discover.veritus.ai/api/v1/user/getCredits",
      headers={"Authorization": "Bearer YOUR_API_KEY"}
  )
  print(response.json())
  ```

  ```javascript javascript theme={null}
  // Step 1: Check your credit balance
  // See: /learn/search-api/user-credits
  const response = await fetch(
    "https://discover.veritus.ai/api/v1/user/getCredits",
    {
      headers: {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  );
  const data = await response.json();
  console.log(data);
  ```

  ```go go theme={null}
  package main

  import (
      "fmt"
      "net/http"
      "io"
  )

  // Step 1: Check your credit balance
  // See: /learn/search-api/user-credits
  func main() {
      req, _ := http.NewRequest("GET", "https://discover.veritus.ai/api/v1/user/getCredits", nil)
      req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
      
      client := &http.Client{}
      resp, _ := client.Do(req)
      defer resp.Body.Close()
      
      body, _ := io.ReadAll(resp.Body)
      fmt.Println(string(body))
  }
  ```
</CodeGroup>

<CodeGroup>
  ```bash curl theme={null}
  # Step 2: Create a keyword search job (credits will be deducted)
  # See: /learn/search-api/jobs-keyword-search
  JOB_RESPONSE=$(curl -X POST "https://discover.veritus.ai/api/v1/job/keywordSearch?limit=100" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "keywords": ["machine learning", "neural networks", "deep learning"],
      "callbackUrl": "https://your-domain.com/webhook"
    }')

  # Extract job ID from response (example)
  JOB_ID="507f1f77bcf86cd799439011"
  ```

  ```python python theme={null}
  import requests

  # Step 2: Create a keyword search job (credits will be deducted)
  # See: /learn/search-api/jobs-keyword-search
  response = requests.post(
      "https://discover.veritus.ai/api/v1/job/keywordSearch?limit=100",
      headers={
          "Authorization": "Bearer YOUR_API_KEY",
          "Content-Type": "application/json"
      },
      json={
          "keywords": ["machine learning", "neural networks", "deep learning"],
          "callbackUrl": "https://your-domain.com/webhook"
      }
  )
  job_data = response.json()
  job_id = job_data["jobId"]
  print(f"Job ID: {job_id}")
  ```

  ```javascript javascript theme={null}
  // Step 2: Create a keyword search job (credits will be deducted)
  // See: /learn/search-api/jobs-keyword-search
  const response = await fetch(
    "https://discover.veritus.ai/api/v1/job/keywordSearch?limit=100",
    {
      method: "POST",
      headers: {
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json"
      },
      body: JSON.stringify({
        keywords: ["machine learning", "neural networks", "deep learning"],
        callbackUrl: "https://your-domain.com/webhook"
      })
    }
  );
  const jobData = await response.json();
  const jobId = jobData.jobId;
  console.log(`Job ID: ${jobId}`);
  ```

  ```go go theme={null}
  package main

  import (
      "bytes"
      "encoding/json"
      "fmt"
      "net/http"
      "io"
  )

  // Step 2: Create a keyword search job (credits will be deducted)
  // See: /learn/search-api/jobs-keyword-search
  func main() {
      payload := map[string]interface{}{
          "keywords": []string{"machine learning", "neural networks", "deep learning"},
          "callbackUrl": "https://your-domain.com/webhook",
      }
      jsonData, _ := json.Marshal(payload)
      
      req, _ := http.NewRequest("POST", "https://discover.veritus.ai/api/v1/job/keywordSearch?limit=100", bytes.NewBuffer(jsonData))
      req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
      req.Header.Set("Content-Type", "application/json")
      
      client := &http.Client{}
      resp, _ := client.Do(req)
      defer resp.Body.Close()
      
      body, _ := io.ReadAll(resp.Body)
      var jobData map[string]interface{}
      json.Unmarshal(body, &jobData)
      jobId := jobData["jobId"].(string)
      fmt.Printf("Job ID: %s\n", jobId)
  }
  ```
</CodeGroup>

<CodeGroup>
  ```bash curl theme={null}
  # Step 3: Check job status
  # See: /learn/search-api/jobs-status
  curl -X GET "https://discover.veritus.ai/api/v1/job/507f1f77bcf86cd799439011" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```python python theme={null}
  import requests

  # Step 3: Check job status
  # See: /learn/search-api/jobs-status
  response = requests.get(
      "https://discover.veritus.ai/api/v1/job/507f1f77bcf86cd799439011",
      headers={"Authorization": "Bearer YOUR_API_KEY"}
  )
  print(response.json())
  ```

  ```javascript javascript theme={null}
  // Step 3: Check job status
  // See: /learn/search-api/jobs-status
  const response = await fetch(
    "https://discover.veritus.ai/api/v1/job/507f1f77bcf86cd799439011",
    {
      headers: {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  );
  const data = await response.json();
  console.log(data);
  ```

  ```go go theme={null}
  package main

  import (
      "fmt"
      "net/http"
      "io"
  )

  // Step 3: Check job status
  // See: /learn/search-api/jobs-status
  func main() {
      req, _ := http.NewRequest("GET", "https://discover.veritus.ai/api/v1/job/507f1f77bcf86cd799439011", nil)
      req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
      
      client := &http.Client{}
      resp, _ := client.Do(req)
      defer resp.Body.Close()
      
      body, _ := io.ReadAll(resp.Body)
      fmt.Println(string(body))
  }
  ```
</CodeGroup>

## Search with Multiple Filters

<CodeGroup>
  ```bash curl theme={null}
  # See: /learn/search-api/jobs-combined-search
  curl -X POST "https://discover.veritus.ai/api/v1/job/combinedSearch?limit=200&fieldsOfStudy=Computer%20Science,Mathematics&minCitationCount=50&openAccessPdf=true&quartileRanking=Q1,Q2,Q3&year=2020:2023&sort=citationCount:desc" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "keywords": ["artificial intelligence", "machine learning", "deep learning"],
      "query": "Recent advances in AI and machine learning research",
      "enrich": true
    }'
  ```

  ```python python theme={null}
  import requests

  # See: /learn/search-api/jobs-combined-search
  response = requests.post(
      "https://discover.veritus.ai/api/v1/job/combinedSearch?limit=200&fieldsOfStudy=Computer%20Science,Mathematics&minCitationCount=50&openAccessPdf=true&quartileRanking=Q1,Q2,Q3&year=2020:2023&sort=citationCount:desc",
      headers={
          "Authorization": "Bearer YOUR_API_KEY",
          "Content-Type": "application/json"
      },
      json={
          "keywords": ["artificial intelligence", "machine learning", "deep learning"],
          "query": "Recent advances in AI and machine learning research",
          "enrich": True
      }
  )
  print(response.json())
  ```

  ```javascript javascript theme={null}
  // See: /learn/search-api/jobs-combined-search
  const response = await fetch(
    "https://discover.veritus.ai/api/v1/job/combinedSearch?limit=200&fieldsOfStudy=Computer%20Science,Mathematics&minCitationCount=50&openAccessPdf=true&quartileRanking=Q1,Q2,Q3&year=2020:2023&sort=citationCount:desc",
    {
      method: "POST",
      headers: {
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json"
      },
      body: JSON.stringify({
        keywords: ["artificial intelligence", "machine learning", "deep learning"],
        query: "Recent advances in AI and machine learning research",
        enrich: true
      })
    }
  );
  const data = await response.json();
  console.log(data);
  ```

  ```go go theme={null}
  package main

  import (
      "bytes"
      "encoding/json"
      "fmt"
      "net/http"
      "io"
  )

  // See: /learn/search-api/jobs-combined-search
  func main() {
      payload := map[string]interface{}{
          "keywords": []string{"artificial intelligence", "machine learning", "deep learning"},
          "query": "Recent advances in AI and machine learning research",
          "enrich": true,
      }
      jsonData, _ := json.Marshal(payload)
      
      req, _ := http.NewRequest("POST", "https://discover.veritus.ai/api/v1/job/combinedSearch?limit=200&fieldsOfStudy=Computer%20Science,Mathematics&minCitationCount=50&openAccessPdf=true&quartileRanking=Q1,Q2,Q3&year=2020:2023&sort=citationCount:desc", bytes.NewBuffer(jsonData))
      req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
      req.Header.Set("Content-Type", "application/json")
      
      client := &http.Client{}
      resp, _ := client.Do(req)
      defer resp.Body.Close()
      
      body, _ := io.ReadAll(resp.Body)
      fmt.Println(string(body))
  }
  ```
</CodeGroup>

## Get Paper Details and Citations

<CodeGroup>
  ```bash curl theme={null}
  # See: /learn/search-api/papers-get
  curl -X GET "https://discover.veritus.ai/api/v1/papers/12345678" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```python python theme={null}
  import requests

  # See: /learn/search-api/papers-get
  response = requests.get(
      "https://discover.veritus.ai/api/v1/papers/12345678",
      headers={"Authorization": "Bearer YOUR_API_KEY"}
  )
  print(response.json())
  ```

  ```javascript javascript theme={null}
  // See: /learn/search-api/papers-get
  const response = await fetch(
    "https://discover.veritus.ai/api/v1/papers/12345678",
    {
      headers: {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  );
  const data = await response.json();
  console.log(data);
  ```

  ```go go theme={null}
  package main

  import (
      "fmt"
      "net/http"
      "io"
  )

  // See: /learn/search-api/papers-get
  func main() {
      req, _ := http.NewRequest("GET", "https://discover.veritus.ai/api/v1/papers/12345678", nil)
      req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
      
      client := &http.Client{}
      resp, _ := client.Do(req)
      defer resp.Body.Close()
      
      body, _ := io.ReadAll(resp.Body)
      fmt.Println(string(body))
  }
  ```
</CodeGroup>
