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

# Search icons

> Search icons by `query` and filters, a page at a time.



## OpenAPI

````yaml openapi/magnific-api-v2-stock-openapi.yaml GET /v2/stock/icons
openapi: 3.1.0
info:
  title: Magnific API v2 — Stock
  version: 2.0.0
  description: >-
    Search, read and download stock under `/v2/stock`: images and templates,
    icons and videos (same items, licences and billing as API v1), and music and
    sound effects (free, as on the web).
servers:
  - url: https://api.magnific.com
    description: Production V2
security:
  - magnificApiKey: []
  - bearerAuth: []
tags:
  - name: Videos
    description: >-
      Generate and edit videos. Add `?dry_run=true` to get the price of a
      request first.
paths:
  /v2/stock/icons:
    get:
      tags:
        - Icons
      summary: Search icons
      description: >-
        Search icons. Follow `meta.pagination.next_cursor` while `has_more`; a
        search with no results is an empty page.


        A personal token needs `api:read`.
      operationId: stock_icons
      parameters:
        - description: >
            Specifies the search query language using the ISO 639-1 (2-letter

            language code) and the ISO 3166-1 (2-letter country code) for
            language variants.

            The API will use "en-US" as a default language for processing if a
            code is not

            provided, or does not exist.
          example: en-US
          in: header
          name: Accept-Language
          required: false
          schema:
            type: string
        - description: The text to search for.
          example: nature
          in: query
          name: query
          required: false
          schema:
            type: string
        - description: Search by slug
          example: dog
          in: query
          name: slug
          required: false
          schema:
            type: string
        - description: Icon family id.
          example: 30955
          in: query
          name: family_id
          required: false
          schema:
            minimum: 1
            type: integer
        - description: >
            Define order of results.

            - Note: If the term or slug parameter is used, the order will be the
            similarity of the search.
          example: relevance
          in: query
          name: order
          required: false
          schema:
            default: relevance
            enum:
              - relevance
              - recent
            type: string
        - description: >
            Size of the thumbnail. 

            If the size is not specified, the API will return 128 as a default
            size.
          example: 128, 512
          in: query
          name: thumbnail_size
          required: false
          schema:
            type: string
        - description: Filter parameters for icons
          explode: true
          in: query
          name: filters
          schema:
            properties:
              color:
                description: Filter by color.
                enum:
                  - gradient
                  - solid-black
                  - multicolor
                  - azure
                  - black
                  - blue
                  - chartreuse
                  - cyan
                  - gray
                  - green
                  - orange
                  - red
                  - rose
                  - spring-green
                  - violet
                  - white
                  - yellow
                example: red
                type: string
              shape:
                description: Filter by shape.
                enum:
                  - outline
                  - fill
                  - lineal-color
                  - hand-drawn
                example: outline
                type: string
              period:
                default: all
                description: Filter by period.
                enum:
                  - three-months
                  - six-months
                  - one-year
                  - all
                example: all
                type: string
              free_svg:
                default: all
                description: Filter by free svg, for free or premium item or all for both
                enum:
                  - all
                  - free
                  - premium
                example: free
                type: string
              icon_type:
                description: Filter of available icon types.
                example:
                  - standard
                  - sticker
                items:
                  enum:
                    - standard
                    - animated
                    - sticker
                    - uicon
                  type: string
                type: array
            type: object
          style: deepObject
        - name: limit
          in: query
          required: false
          description: Results per page. A cursor keeps the size of the page it came from.
          schema:
            type: integer
            minimum: 1
            maximum: 100
        - name: cursor
          in: query
          required: false
          description: The `next_cursor` of the previous page; absent for the first.
          schema:
            type: string
            maxLength: 256
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    items:
                      $ref: '#/components/schemas/Stockicon_b2b'
                    type: array
                  meta:
                    $ref: '#/components/schemas/StockV2Meta'
                required:
                  - data
                  - meta
        '400':
          description: >-
            `validation_failed`: a parameter is not valid (`details.errors` by
            field, e.g. `query`, `cursor`, `filters.color`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StockV2Error'
        '401':
          description: '`unauthenticated`: the token or API key is missing or not valid.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StockV2Error'
        '403':
          description: >-
            `forbidden`, `upgrade_required` (a premium asset on a plan without
            premium), `restricted_author_content`, `magnific_api_disabled`,
            `key_not_supported` or `api_key_wallet_unavailable`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StockV2Error'
        '429':
          description: '`rate_limited`: too many requests or downloads.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StockV2Error'
        '500':
          description: '`internal_error`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StockV2Error'
        '503':
          description: >-
            `service_unavailable`: the search engine or a dependency is down;
            retry later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StockV2Error'
      security:
        - magnificApiKey: []
        - bearerAuth: []
components:
  schemas:
    Stockicon_b2b:
      example:
        free_svg: true
        created: '2023-03-07T23:05:26.000Z'
        author:
          assets: 0
          name: John Doe
          id: 2147483647
          avatar: https://avatar.cdnpk.net/61668527-220726032514.jpg
          slug: merry-christmas
        name: >-
          a woman reads a book in a tablet sits in the luxurious back of the
          library
        style:
          name: Meticulous Yellow shadow
          id: 50
        id: 52912
        family:
          total: 1200
          name: Outline
          id: 1
        thumbnails:
          - width: 512
            url: >-
              https://v4.cdnpk.net/videvo_files/video/free/video0485/thumbnails/_import_61a866e2519c71.61070863_large.png
            height: 512
          - width: 512
            url: >-
              https://v4.cdnpk.net/videvo_files/video/free/video0485/thumbnails/_import_61a866e2519c71.61070863_large.png
            height: 512
        slug: >-
          a-woman-reads-a-book-in-a-tablet-sits-in-the-luxurious-back-of-the-library
        tags:
          - name: Dog
            slug: dog
          - name: Dog
            slug: dog
      properties:
        id:
          example: 52912
          type: integer
        name:
          example: >-
            a woman reads a book in a tablet sits in the luxurious back of the
            library
          type: string
        created:
          example: '2023-03-07T23:05:26.000Z'
          format: date-time
          type: string
        slug:
          example: >-
            a-woman-reads-a-book-in-a-tablet-sits-in-the-luxurious-back-of-the-library
          type: string
        style:
          $ref: '#/components/schemas/Stockicon_style'
        family:
          $ref: '#/components/schemas/Stockicon_family'
        author:
          $ref: '#/components/schemas/Stockauthor'
        thumbnails:
          items:
            $ref: '#/components/schemas/Stocksource'
          type: array
        free_svg:
          description: If true, the icon has the svg for free downloading
          example: true
          type: boolean
        tags:
          items:
            $ref: '#/components/schemas/Stocktag'
          type: array
      required:
        - author
        - created
        - family
        - free_svg
        - id
        - name
        - slug
        - style
        - thumbnails
      type: object
    StockV2Meta:
      type: object
      required:
        - pagination
      properties:
        pagination:
          type: object
          required:
            - has_more
          properties:
            has_more:
              type: boolean
              description: 'More results follow: send `next_cursor` as `cursor`.'
            next_cursor:
              type: string
              description: Send it as `cursor` for the next page. Absent on the last page.
    StockV2Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: >-
            Stable, for code: `validation_failed`, `unauthenticated`,
            `insufficient_credits`, `forbidden`, `upgrade_required`,
            `not_found`, `rate_limited`, `internal_error`,
            `service_unavailable`...
          example: validation_failed
        message:
          type: string
          description: For people. Never the cause of a server error.
        details:
          type: object
          description: Absent on a server error.
          properties:
            errors:
              type: object
              description: Validation messages by field.
              additionalProperties:
                type: array
                items:
                  type: string
        request_id:
          type: string
    Stockicon_style:
      example:
        name: Meticulous Yellow shadow
        id: 50
      properties:
        id:
          description: Style ID
          example: 50
          type: integer
        name:
          description: Style name
          example: Meticulous Yellow shadow
          type: string
      required:
        - id
        - name
      type: object
    Stockicon_family:
      example:
        total: 1200
        name: Outline
        id: 1
      properties:
        id:
          description: Id of the icon family
          example: 1
          type: integer
        name:
          description: Name of the icon family
          example: Outline
          type: string
        total:
          description: Total of icons in the family
          example: 1200
          type: integer
      type:
        - object
        - 'null'
    Stockauthor:
      example:
        assets: 0
        name: John Doe
        id: 2147483647
        avatar: https://avatar.cdnpk.net/61668527-220726032514.jpg
        slug: merry-christmas
      properties:
        id:
          maximum: 9223372036854776000
          minimum: 1
          type: integer
        name:
          example: John Doe
          minLength: 1
          type: string
        avatar:
          example: https://avatar.cdnpk.net/61668527-220726032514.jpg
          format: uri
          type: string
        assets:
          description: The number of assets of this author.
          minimum: 0
          type: integer
        slug:
          example: merry-christmas
          minLength: 1
          type: string
      required:
        - assets
        - avatar
        - id
        - name
        - slug
      type: object
    Stocksource:
      example:
        width: 512
        url: >-
          https://v4.cdnpk.net/videvo_files/video/free/video0485/thumbnails/_import_61a866e2519c71.61070863_large.png
        height: 512
      properties:
        url:
          example: >-
            https://v4.cdnpk.net/videvo_files/video/free/video0485/thumbnails/_import_61a866e2519c71.61070863_large.png
          format: uri
          type: string
        width:
          example: 512
          type: integer
        height:
          example: 512
          type: integer
      type: object
    Stocktag:
      example:
        name: Dog
        slug: dog
      properties:
        slug:
          example: dog
          type: string
        name:
          example: Dog
          type: string
      type: object
  securitySchemes:
    magnificApiKey:
      type: apiKey
      in: header
      name: x-magnific-api-key
      description: >-
        Your Magnific API key. [Learn how to obtain an API
        key](https://docs.magnific.com/quickstart)
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        A personal access token, sent as `Authorization: Bearer <token>`. [How
        to get one](/api-reference/v2/overview#get-a-personal-access-token)

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.