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

# Get Multiple Projects

> Retrieve multiple [Projects](/core-resources/project).

<Accordion title="Authentication" icon="key">
  Every request sent to Scale's API requires authentication. In short, your API Key is the Bearer token. See the [Authentication](/get-started/authentication) section for more details.
</Accordion>


## OpenAPI

````yaml GET /v2/projects
openapi: 3.1.0
info:
  title: GenAI API Spec
  description: 'Data Engine: Generative AI API Specification'
  version: 0.0.1
servers:
  - url: https://api.scale.com
security:
  - bearerAuth: []
  - basicAuth: []
paths:
  /v2/projects:
    get:
      tags:
        - v2
      summary: Get Multiple Projects
      description: Retrieve multiple [Projects](/core-resources/project).
      operationId: getProjects
      parameters:
        - $ref: '#/components/parameters/created_after'
        - $ref: '#/components/parameters/created_before'
      responses:
        '200':
          description: List of projects.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetProjectsResponse'
              examples:
                Sample Projects:
                  value:
                    projects:
                      - $ref: '#/components/examples/SampleProject/value'
        '500':
          description: Error response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status_code:
                    type: number
                    example: 500
                  error:
                    type: string
                    example: An error has occurred.
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |
            API_KEY='live_...'
            PARAMS='created_after=2024-01-01T00:00:00Z'
            curl --request GET \
                --url "https://api.scale.com/v2/projects?$PARAMS" \
                --header "Authorization: Bearer $API_KEY"
        - lang: python
          label: Python SDK
          source: |
            import scaleapi

            API_KEY = 'live_...'
            client = scaleapi.ScaleClient(API_KEY)

            response = client.v2.get_projects(
              created_after="2024-01-01T00:00:00Z",
            )
            print(response.to_json())
        - lang: python
          label: Python
          source: |
            import requests

            API_KEY = 'live_...'
            params = {
              "created_after": "2024-01-01T00:00:00Z",
            }

            response = requests.request(
              "GET",
              url="https://api.scale.com/v2/projects",
              params=params,
              headers={
                "Accept": "application/json",
                "Authorization": f"Bearer {API_KEY}",
              },
            )
            print(response.json())
        - lang: javascript
          label: JavaScript
          source: >
            const API_KEY = 'live_...';

            const params = new URLSearchParams({
              created_after: '2024-01-01T00:00:00Z',
            });


            const response = await fetch('https://api.scale.com/v2/projects?' +
            params.toString(), {
              method: 'GET',
              headers: {
                Accept: 'application/json',
                Authorization: `Bearer ${API_KEY}`,
              },
            });

            console.log(await response.json());
        - lang: go
          label: Go
          source: |
            package main

            import (
              "fmt"

              "io/ioutil"
              "net/http"
              "net/url"
            )

            func main() {
              apiKey := "live_..."
              params := map[string]string{
                "created_after": "2024-01-01T00:00:00Z",
              }

              url := fmt.Sprintf("https://api.scale.com/v2/projects?%s", encodeQueryParams(params))

              req, _ := http.NewRequest("GET", url, nil)

              req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", apiKey))

              res, _ := http.DefaultClient.Do(req)

              defer res.Body.Close()
              body, _ := ioutil.ReadAll(res.Body)

              fmt.Println(string(body))
            }

            func encodeQueryParams(params map[string]string) string {
              query := url.Values{}
              for key, value := range params {
                query.Add(key, value)
              }
              return query.Encode()
            }
        - lang: java
          label: Java
          source: |
            package com.scale.api;

            import kong.unirest.HttpResponse;
            import kong.unirest.Unirest;
            import java.io.UnsupportedEncodingException;
            import java.net.URLEncoder;
            import java.util.Map;
            import java.util.stream.Collectors;

            public class App {
                public static void main(String[] args) {
                    String apiKey = "live_...";
                    Map<String, String> params = Map.of(
                        "created_after", "2024-01-01T00:00:00Z"
                    );

                    String url = String.format("https://api.scale.com/v2/projects?%s", encodeQueryParams(params));

                    HttpResponse<String> response = Unirest.get(url)
                      .header("Authorization", String.format("Bearer %s", apiKey))
                      .asString();

                    System.out.println(response.getBody());
                }

                private static String encodeQueryParams(Map<String, String> params) {
                    return params.entrySet()
                                .stream()
                                .map(entry -> {
                                    return String.format("%s=%s", utf8Encode(entry.getKey()), utf8Encode(entry.getValue()));
                                })
                                .collect(Collectors.joining("&"));
                }

                private static String utf8Encode(String s) {
                    try {
                        return URLEncoder.encode(s, "UTF-8");
                    } catch (UnsupportedEncodingException e) {
                        throw new RuntimeException("Error encoding string", e);
                    }
                }
            }
components:
  parameters:
    created_after:
      name: created_after
      in: query
      required: false
      description: >-
        Projects with a `created_at` after the given date will be returned. A
        timestamp formatted as an ISO 8601 date-time string.
      schema:
        $ref: '#/components/schemas/DateString'
    created_before:
      name: created_before
      in: query
      required: false
      description: >-
        Projects with a `created_at` before the given date will be returned. A
        timestamp formatted as an ISO 8601 date-time string.
      schema:
        $ref: '#/components/schemas/DateString'
  schemas:
    GetProjectsResponse:
      type: object
      required:
        - projects
      properties:
        projects:
          $ref: '#/components/schemas/Projects'
    DateString:
      type: string
      format: date-time
      description: A timestamp formatted as an ISO 8601 date-time string.
    Projects:
      type: array
      description: Array of project objects
      items:
        $ref: '#/components/schemas/Project'
    Project:
      type: object
      required:
        - id
        - name
        - created_at
      properties:
        id:
          $ref: '#/components/schemas/ProjectId'
          description: Unique identifier for the project
        name:
          $ref: '#/components/schemas/ProjectName'
        created_at:
          $ref: '#/components/schemas/DateString'
        types:
          type: array
          description: List of project types associated with the project.
          items:
            $ref: '#/components/schemas/GenAIProjectType'
          example:
            - 'RLHF: Pref Ranking'
        models:
          type: array
          description: List of models associated with the project.
          items:
            $ref: '#/components/schemas/Model'
          example:
            - gpt-4
            - my-model-123
    ProjectId:
      type: string
      description: A unique identifier for the project.
      example: project_abc123
    ProjectName:
      type: string
      description: The name of the project.
      example: My Scale Project
    GenAIProjectType:
      type: string
      enum:
        - SFT
        - 'RLHF: Pref Ranking'
        - 'RLHF: Pref Ranking with Rewrites'
        - 'RLVR: Reinforcement Learning with Verifiable Rewards'
        - Rubrics
        - Process Supervision
        - Evals
        - Prompt Generation
        - Content Understanding
        - Other
    Model:
      type: string
      description: The name of the model that generated the message.
      example: my-model-123
  securitySchemes:
    bearerAuth:
      description: >-
        Your API Key is the Bearer token. See the
        [Authentication](/get-started/authentication) section to learn how to
        access your key.
      type: http
      scheme: bearer
    basicAuth:
      description: >-
        Basic HTTP Authentication. Your API Key is your username.  Learn more
        about setting up Authentication [here](/get-started/authentication).
      type: http
      scheme: basic

````