Build with ChatGPT

Paste one prompt into ChatGPT, Claude or Cursor and get working code that reads eBay sold prices from the Soldgraph API.

Last updated

If an AI assistant is writing your code, give it this prompt first. It tells the assistant the endpoint, the sign-in header and how to wait for a result, so the first script it writes works.

#1. Get a key

Create an account and create a key in API keys. It is free for 100 requests a month, with no card. Save the key as SOLDGRAPH_KEY in your environment. Do not paste the key into the chat.

#2. Paste the prompt

Prompt for ChatGPT, Claude or Cursor
I'm building with the Soldgraph API. It returns sold and for-sale listings from eBay and other resale marketplaces. Read the docs first: https://soldgraph.com/llms.txtOpenAPI spec: https://soldgraph.com/openapi.json Rules for the code you write:- Base URL: https://api.soldgraph.com/v1- Auth: send the header "Authorization: Bearer <key>". Read the key from the SOLDGRAPH_KEY environment variable. Never put it in browser code.- eBay sold prices: GET /ebay/sold?q=<search words>. Add count=200 for up to 200 rows.- A search often answers 202 with status "pending" and a poll_url. Request https://api.soldgraph.com plus poll_url with ?wait=20 and the same header, until status is "complete" or "failed".- Read result.summary for the median, low and high price. The rows are in result.data, each with title, displayed_price, sold_date and link.- Each completed search uses one request. The free plan has 100 a month, so save results while testing instead of repeating a search. Start with a short script that prints the median sold price for "nintendo switch oled". Then ask me what I want to build.

#3. Run what it writes

The first script should print one number: the median sold price for a Nintendo Switch OLED. If it does, the key and the code both work. Then tell the assistant what you are building, such as a deal finder, a pricing bot or a resale app.

#If something goes wrong

  • 401: the key is missing or wrong. Check that SOLDGRAPH_KEY is set where the code runs. See Authentication.
  • The result never arrives: the code is not polling. A search can answer 202 first, and the result comes from poll_url. See Search jobs.
  • 429 quota_exceeded: the month's requests are used up. See Usage and billing.

#Want the assistant to search for you instead?

That needs no code. Connect it to the hosted MCP server and ask in plain English.