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

# Map

> List the URLs on a website, optionally ordered by relevance to a search.

List the URLs of a website. For a guide with examples, see [Map](/features/map.md).


## OpenAPI

````yaml /api-reference/openapi.json POST /map
openapi: 3.1.0
info:
  title: ScreenshotRender API
  version: v1
  description: >-
    Screenshot any website, search the web, and turn any page or document into
    clean Markdown or structured data.
servers:
  - url: https://www.screenshotrender.com/api/v1
security:
  - bearerAuth: []
paths:
  /map:
    post:
      tags:
        - Map
      summary: Map
      description: List the URLs on a website, optionally ordered by relevance to a search.
      operationId: map
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MapRequest'
      responses:
        '200':
          description: The URLs found on the site.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MapResponse'
        '400':
          $ref: '#/components/responses/InvalidRequest'
        '401':
          $ref: '#/components/responses/InvalidApiKey'
        '402':
          $ref: '#/components/responses/InsufficientCredits'
        '429':
          $ref: '#/components/responses/Busy'
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl -s -X POST "https://www.screenshotrender.com/api/v1/map" \
              -H "Authorization: Bearer $SCREENSHOTRENDER_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{
                "url": "https://docs.python.org/3/",
                "limit": 5
              }'
        - lang: javascript
          label: Node
          source: >-
            import ScreenshotRender from "screenshotrender";


            const screenshotrender = new ScreenshotRender({ apiKey:
            "sr-YOUR-API-KEY" });


            const site = await
            screenshotrender.map("https://docs.python.org/3/", { limit: 5 });


            for (const link of site.links) {
              console.log(link.url, link.title);
            }
        - lang: python
          label: Python
          source: |-
            from screenshotrender import ScreenshotRender

            screenshotrender = ScreenshotRender(api_key="sr-YOUR-API-KEY")

            site = screenshotrender.map("https://docs.python.org/3/", limit=5)

            for link in site.links:
                print(link.url, link.title)
components:
  schemas:
    MapRequest:
      type: object
      properties:
        url:
          type: string
          example: https://docs.python.org/3/
        search:
          type: string
          description: Order the URLs by relevance to this text.
        limit:
          type: integer
          description: Most URLs to return.
      required:
        - url
    MapResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
          properties:
            links:
              type: array
              items:
                type: object
                properties:
                  url:
                    type: string
                  title:
                    type: string
                  description:
                    type: string
        creditsUsed:
          type: integer
          example: 1
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          description: What went wrong, in words.
        code:
          type: string
          description: A stable code to branch on, such as `invalid_request`.
        field:
          type: string
          description: The request field the error is about, when there is one.
      required:
        - success
        - error
        - code
  responses:
    InvalidRequest:
      description: Something in the request isn't valid. `field` names it, when known.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error: url is required.
            code: invalid_request
            field: url
    InvalidApiKey:
      description: The API key doesn't match an account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error: Invalid API key.
            code: invalid_api_key
    InsufficientCredits:
      description: The balance can't cover the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error: >-
              This crawl can use up to 10000 credits (10000 pages at 1 credit
              each) and your balance is 773. Lower the page limit or add
              credits.
            code: insufficient_credits
    Busy:
      description: >-
        Too many requests right now. Wait for `Retry-After` seconds and send it
        again.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Your API key from the dashboard. It starts with `sr-`.

````