# Sourcify — Lookup signatures

Resolve Sourcify function, error and event hashes via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Sourcify, pass parameters such as function, and retrieve structured data including response success flag, name, filtered, and has verified contract for calldata inspection, and event tools, ready for production pipelines and AI agent automation.

Documentation: https://openany.si/sourcify/sourcify-lookup-signatures/efb38186-25a8-47ed-b163-7e5e4e19c113/
API ID: efb38186-25a8-47ed-b163-7e5e4e19c113
Provider: sourcify
Contract revision: 4
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/sourcify/signature-database/v1/lookup
Page update time: 2026-12-03T02:49:10.583Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0 / call
The published contract currently has no usage charge. Authentication and service limits still apply.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:49:10.048Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "0",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Usage and limits
## Sourcify Signature Lookup API

Use function for comma-separated four-byte function or error selectors and event for full 32-byte event hashes. Returned maps group candidate names by hash; a selector can have multiple candidates and is not a unique ABI identification.

## What You Can Build

- **Calldata inspection**: Display candidate names for a selected four-byte selector.
- **Event tools**: Resolve event-topic hashes while retaining all returned candidates.

## Documented Response Fields

| Field | Meaning |
| --- | --- |
| `ok` | Response success flag |
| `result.function.<selector>[].name` | Candidate text signature for a function or error hash |
| `result.function.<selector>[].filtered` | Whether the candidate is flagged as filtered |
| `result.function.<selector>[].hasVerifiedContract` | Whether the candidate has a verified-contract association |
| `result.event` | Map of event hashes to candidates |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Sourcify — Lookup signatures request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "function": {
          "type": "string",
          "description": "A comma-delimited list of function or error hashes with leading 0x prefix. Must be exactly 10 characters (0x + 8 hex chars). Since the original openchain.xyz API didn't support error signatures, we treat error signatures as function signatures. They are both 4 byte hashes."
        },
        "event": {
          "type": "string",
          "description": "A comma-delimited list of event hashes with leading 0x prefix. Must be exactly 66 characters (0x + 64 hex chars)."
        },
        "filter": {
          "type": "boolean",
          "description": "Whether or not to filter out junk results"
        }
      }
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "result": {
      "type": "object",
      "properties": {
        "event": {
          "type": "object",
          "properties": {}
        },
        "function": {
          "type": "object",
          "properties": {
            "0xa9059cbb": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "filtered": {
                    "type": "boolean"
                  },
                  "hasVerifiedContract": {
                    "type": "boolean"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
```

## Request example
Scenario: Documentation example
```bash
curl \
  'https://api.openany.si/v1/agent-apis/sourcify/signature-database/v1/lookup?function=0xa9059cbb' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Published documentation example. Verify the actual response after an approved call.
Sample response · Documented HTTP 200
```json
{
  "ok": true,
  "result": {
    "event": {},
    "function": {
      "0xa9059cbb": [
        {
          "filtered": false,
          "hasVerifiedContract": true,
          "name": "transfer(address,uint256)"
        }
      ]
    }
  }
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### How long should each hash be?
A function or error selector has 10 characters including 0x; an event hash has 66 characters including 0x. Separate multiple hashes with commas.

### Which parameter accepts error selectors?
Use function. This API groups four-byte error selectors with function selectors.

### Does a match prove the contract uses that ABI?
No. Hash collisions can produce multiple candidate names. Confirm against the target contract’s verified ABI when available.

### What does filter do?
It controls filtering of junk candidates. Inspect returned candidate flags and verified-contract associations rather than treating every match as equally reliable.

### Which API key should I use?
Use your OpenAny API key as Bearer authentication on the documented OpenAny route.

### Where can I check the current request price?
Check the pricing area for the selected implementation. Follow its billing unit and any request-dependent rules before sending the request.

## Available implementations
- sourcify: https://openany.si/sourcify/sourcify-lookup-signatures/efb38186-25a8-47ed-b163-7e5e4e19c113/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
