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

# /paypayfleamarket/categories

> Walk the Yahoo!フリマ (formerly PayPay フリマ) category tree one level at a time. Pass a parent category id to get its direct children, or 1 for the 21 top-level categories. The tree is four levels deep and the returned ids are exactly the values the category filter of the listing search accepts. Leaf categories also carry the product category the source maps them to.

**Price:** 1 credit

**⚠️ Common errors:** 412: Category not found, or it is a leaf category with no children



## OpenAPI

````yaml /openapi/e-commerce-marketplaces.json post /api/paypayfleamarket/categories
openapi: 3.1.0
info:
  title: Any Site API
  description: >+
    Any Site API provides programmatic access to data from LinkedIn, Instagram,
    Twitter, and other platforms.


    ## Authentication


    All API endpoints require an `access-token` header with a valid API token.
    Tokens can be created in the [dashboard](https://app.anysite.io/).


    ## Pricing


    Each endpoint has a credit cost listed in its description. Credits are
    deducted from your token balance per request.

  version: 0.0.1
servers: []
security:
  - AccessToken: []
paths:
  /api/paypayfleamarket/categories:
    post:
      tags:
        - /paypayfleamarket
      summary: /paypayfleamarket/categories
      description: >-
        Walk the Yahoo!フリマ (formerly PayPay フリマ) category tree one level at a
        time. Pass a parent category id to get its direct children, or 1 for the
        21 top-level categories. The tree is four levels deep and the returned
        ids are exactly the values the category filter of the listing search
        accepts. Leaf categories also carry the product category the source maps
        them to.


        **Price:** 1 credit


        **⚠️ Common errors:** 412: Category not found, or it is a leaf category
        with no children
      operationId: __api_paypayfleamarket_categories_post
      parameters:
        - name: access-token
          in: header
          required: true
          schema:
            anyOf:
              - type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaypayfleamarketCategoriesPayload'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PaypayfleamarketCategory'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PaypayfleamarketCategoriesPayload:
      properties:
        timeout:
          type: integer
          maximum: 1500
          minimum: 20
          default: 300
        category:
          type: integer
          minimum: 1
          default: 1
        count:
          type: integer
          minimum: 1
      type: object
      required:
        - count
    PaypayfleamarketCategory:
      properties:
        '@type':
          type: string
          default: PaypayfleamarketCategory
        id:
          type: integer
        name:
          type: string
        url:
          type: string
        parent_id:
          type: integer
        is_leaf:
          type: boolean
        is_wear_category:
          anyOf:
            - type: boolean
            - type: 'null'
        is_purchase_prohibited_under_18:
          anyOf:
            - type: boolean
            - type: 'null'
        product_category:
          anyOf:
            - $ref: '#/components/schemas/PaypayfleamarketCategoryRef'
            - type: 'null'
      type: object
      required:
        - id
        - name
        - url
        - parent_id
        - is_leaf
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    PaypayfleamarketCategoryRef:
      properties:
        '@type':
          type: string
          default: PaypayfleamarketCategoryRef
        id:
          type: integer
        name:
          type: string
      type: object
      required:
        - id
        - name
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
        input: {}
        ctx:
          type: object
      type: object
      required:
        - loc
        - msg
        - type
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: access-token
      description: API token from the dashboard

````