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

# starknet_call | Starknet

> Starknet API method that executes a function call to a contract without creating a Starknet transaction. Chainstack Starknet reference.

<Note>
  **Starknet OpenRPC spec**

  For the latest version of the publicly maintained OpenRPC spec, see the [Starknet specs GitHub repo](https://github.com/starkware-libs/starknet-specs).
</Note>

Starknet API method that executes a function call to a contract without creating a Starknet transaction.

It allows you to call a function in a contract and returns the value of the function that you run on the contract. Using this call will not create a transaction; hence, it will not change the state.

## Parameters

* `request` — the details of the function call:
  * `contract_address` — the address of the contract to be called.
  * `entry_point_selector` — the selector of the function to be called.
  * `calldata` — the parameters passed to the function.
* `block_id` — the hash of the requested block, or number (height) of the requested block, or a block tag, for the block referencing the state or call the transaction on.

## Response

* `result` — the function's return value, as defined in the Cairo output.

## Use case

A practical use case for `starknet_call` is to interact with a contract's function without creating a transaction or changing the state. This can be useful for querying contract state or testing function calls.

## Deprecated feeder gateway method

The feeder gateway was deprecated on [December 11, 2023](https://community.starknet.io/t/feeder-gateway-deprecation/100233).

Example of the call you had to make to the feeder gateway before the deprecation:

```Text Shell theme={"system"}
curl --request POST \
     --url 'https://alpha-mainnet.starknet.io/feeder_gateway/call_contract?blockNumber=pending' \
     --header 'Content-Type: application/json' \
     --data-raw '{
         "contract_address": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
         "entry_point_selector": "0x2e4263afad30923c891518314c3c95dbe830a16874e8abc5777a9a20b54c76e",
         "calldata": ["0x03a20d4f7b4229e7c4863dab158b4d076d7f454b893d90a62011882dc4caca2a"]
     }'
```


## OpenAPI

````yaml openapi/starknet_node_api/starknet_call.json POST /365cf697a3ad6d950b4c4a911e2e4f4d
openapi: 3.0.0
info:
  title: starknet
  version: 1.0.0
  contact: {}
servers:
  - url: https://starknet-mainnet.core.chainstack.com
security: []
paths:
  /365cf697a3ad6d950b4c4a911e2e4f4d:
    post:
      summary: starknet_call
      description: starknet_call
      operationId: starknetCall
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: starknet_call
                params:
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          calldata:
                            type: array
                            items:
                              $ref: '#/components/schemas/FELT'
                            default:
                              - >-
                                0x03a20d4f7b4229e7c4863dab158b4d076d7f454b893d90a62011882dc4caca2a
                          contract_address:
                            type: string
                            default: >-
                              0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7
                          entry_point_selector:
                            type: string
                            default: >-
                              0x2e4263afad30923c891518314c3c95dbe830a16874e8abc5777a9a20b54c76e
                      - type: string
                        enum:
                          - pending
                  default:
                    - calldata:
                        - >-
                          0x03a20d4f7b4229e7c4863dab158b4d076d7f454b893d90a62011882dc4caca2a
                      contract_address: >-
                        0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7
                      entry_point_selector: >-
                        0x2e4263afad30923c891518314c3c95dbe830a16874e8abc5777a9a20b54c76e
                    - pending
      responses:
        '200':
          description: Successful response
components:
  schemas:
    FELT:
      type: string
      title: Field element
      description: A field element. represented by at most 63 hex digits
      pattern: ^0x(0|[a-fA-F1-9]{1}[a-fA-F0-9]{0,62})$

````