somnia-agents-json-fetch

Extract specific values from JSON responses fetched from public APIs.

1|1|Updated May 8, 2026
One-click install
npx skills add https://github.com/emrestay/somnia-agents-skills --skill somnia-agents-json-fetch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: somnia-agents-json-fetch
Source: https://github.com/emrestay/somnia-agents-skills/tree/main/skills/somnia-agents-json-fetch
Command: npx skills add https://github.com/emrestay/somnia-agents-skills --skill somnia-agents-json-fetch

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires axios, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill enables the retrieval and parsing of JSON data from public APIs, allowing seamless incorporation of external information into blockchain applications.

Core Features & Use Cases

  • Data Retrieval: Fetch values such as prices, statuses, or lists from REST APIs.
  • Use Case: Example—fetch the current Bitcoin price from CoinGecko and update a smart contract with the latest data.
  • Precision Handling: Convert JSON numerical data with decimal scaling for accurate on-chain representation.

Quick Start

Use the json-fetch skill to obtain the current Ethereum price in USD and use it within your smart contract.

Frequently Asked Questions about somnia-agents-json-fetch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fetch JSON data from public APIs for blockchain oracle integration?

Fetch JSON data from public APIs for blockchain oracle integration by extracting specific values from REST responses using selector paths. This skill retrieves real-time data feeds like cryptocurrency prices and scales numerical decimals for accurate on-chain representation.

Can I extract specific values from a JSON response to update a smart contract?

Yes, you can extract specific values from a JSON response to update a smart contract by defining selector paths. This allows decentralized applications to pull real-time external data, such as the current Ethereum price in USD, on-demand.

What is the best way to handle decimal scaling when fetching API data for Web3 oracles?

Handle decimal scaling when fetching API data for Web3 oracles by converting JSON numerical data with precision scaling. This ensures fetched values maintain accuracy and are correctly formatted for on-chain representation within smart contracts.

Does this JSON data retrieval method support various data types for decentralized applications?

This JSON data retrieval method supports various data types for decentralized applications, including prices, statuses, and lists. It uses flexible selector paths to parse REST API responses, ensuring reliable on-demand data feeds for oracle integration.

Do I need axios to retrieve real-time data feeds for smart contracts?

Yes, you need axios to retrieve real-time data feeds for smart contracts. This HTTP client dependency enables the skill to fetch JSON responses from public APIs and parse them for seamless incorporation into blockchain applications.

Why should I use a dedicated data-fetch skill instead of directly querying APIs in my smart contract?

Use a dedicated data-fetch skill instead of directly querying APIs in your smart contract because smart contracts cannot natively fetch external data. This skill bridges the gap by extracting off-chain JSON values and preparing them for reliable oracle integration.