Plasmate GPT Action

April 11, 2026 ยท View on GitHub

A custom GPT Action that enables ChatGPT to fetch web pages as clean, structured content using Plasmate's Semantic Object Model (SOM).

What is Plasmate?

Plasmate is a browser engine for AI agents that converts HTML into structured JSON. Instead of parsing thousands of tokens of raw HTML, Plasmate provides a semantic representation that is 10-100x smaller while preserving all meaningful content.

Features

  • Fetch Pages: Convert any URL to structured SOM JSON, plain text, or Markdown
  • Extract Links: Get all hyperlinks from a page with context
  • Selective Fetching: Use CSS selectors to fetch only specific page regions
  • Token Efficient: Dramatically reduces context window usage compared to raw HTML

Setup Instructions

1. Create Your GPT

  1. Go to ChatGPT
  2. Click your profile picture -> My GPTs -> Create a GPT
  3. Or go directly to: https://chat.openai.com/gpts/editor

2. Configure the GPT

In the Configure tab:

Name: Plasmate Web Reader (or your preferred name)

Description: Fetch and analyze web pages with 10-100x fewer tokens than raw HTML

Instructions: Copy the contents of gpt-instructions.md into the Instructions field

3. Add the Action

  1. Scroll down to Actions and click Create new action
  2. Click Import from URL or paste the OpenAPI schema directly

If importing from URL:

  • Host openapi.yaml somewhere accessible (GitHub raw, your server, etc.)
  • Enter the URL and click Import

If pasting directly:

  • Copy the entire contents of openapi.yaml
  • Paste into the schema editor

4. Configure Authentication (if required)

If your Plasmate API requires authentication:

  1. Under Authentication, select API Key
  2. Choose Bearer as the Auth Type
  3. You'll add your API key when you use the GPT

5. Set Privacy Policy

  1. Under Additional Settings, add the privacy policy URL
  2. You can host privacy-policy.md or use: https://plasmate.app/privacy
  1. Click the GPT icon to upload a logo
  2. Use the Plasmate logo from the main repository (see logo-instructions.txt)

7. Save and Test

  1. Click Save (choose visibility: Only me, Anyone with a link, or Public)
  2. Test by asking: "Fetch the homepage of example.com"

Usage Examples

Once your GPT is set up, try these prompts:

Fetch the main content from https://example.com/article

Extract all links from https://docs.example.com

Get the text content from https://news.example.com, focus on the main article

What's on the pricing page of https://example.com/pricing?

Files in This Repository

FilePurpose
openapi.yamlOpenAPI 3.1 schema for the GPT Action
gpt-instructions.mdSystem prompt/instructions for the GPT
privacy-policy.mdPrivacy policy for the action
logo-instructions.txtNotes about using the Plasmate logo
README.mdThis setup guide

Troubleshooting

Action not working?

  • Verify the server URL in openapi.yaml is correct
  • Check that the API is accessible (not blocked by CORS for server-side calls)
  • Review the OpenAPI schema for syntax errors

Getting errors?

  • Some sites block automated access
  • JavaScript-heavy sites may return incomplete content
  • Try using a selector to fetch less content

Too many tokens?

  • Use the selector parameter to focus on specific regions
  • Use format: "text" for plain text extraction
  • Target main or article instead of full page

API Reference

See openapi.yaml for the complete API specification.

POST /fetch

Fetch a web page and return structured content.

ParameterTypeRequiredDescription
urlstringYesURL to fetch
formatstringNoOutput format: json, text, or markdown
selectorstringNoCSS selector to focus on specific content

POST /extract-links

Extract all links from a web page.

ParameterTypeRequiredDescription
urlstringYesURL to extract links from

License

MIT License - See the main Plasmate repository for details.