Save a page-to-JSON config as a reusable API
pulpminer_save_as_apiSave a URL + JSON format as a PulpMiner API (POST /external/ai/json/save). Afterwards the data is available at {baseUrl}/external/{apiId} with the apikey header (see pulpminer_fetch_api_data). For a dynamic API, pass dynamicUrl with {{ variable }} placeholders, e.g. https://site.com/search?q={{ query }}; callers then supply those variables. Saving itself is free; each later fetch costs 0.4 credits (+0.1 with renderJs). Needs only the PulpMiner API key (PULPMINER_API_KEY locally, or Authorization: Bearer <key> on the hosted server).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| llm | No | LLM used to convert HTML to JSON. llm_2 = OpenAI GPT (default), llm_1 = Google Gemini, llm_3 = Groq (only if enabled for the account; otherwise the API returns 'bad request'). | llm_2 |
| url | Yes | Page URL the API scrapes (for dynamic APIs: an example URL with real values). | |
| cache | No | Cache results: serve cached JSON (24h TTL) and refresh in the background when older than 15 min. | |
| scraper | No | Scraper backend. scraper_1 (default, supports useSession) or scraper_2. Try the other one if a site blocks scraping. | scraper_1 |
| renderJs | No | Render JavaScript in a headless browser before extracting (default true; adds 0.1 credits). | |
| selector | No | CSS selector to limit extraction to part of the page, e.g. "main" or "#results". Default: whole body. | |
| dynamicUrl | No | Optional URL template with {{ variable }} placeholders. When set the API becomes dynamic and must be called with variables. | |
| jsonFormat | Yes | Required. The JSON shape the API should return, usually the output of pulpminer_generate_json (values can be left as examples). | |
| useSession | No | Use a persistent scraping session (scraper_1 only; ignored for lifetime-plan accounts). | |
| extraLLMInfo | No | Extra natural-language instructions for the LLM, e.g. 'only the first 10 products, prices as numbers'. |