{
  "info": {
    "name": "pageflock API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "Set base_url to your pageflock origin and api_key as a private local value. Run Get usage first. Extraction costs one credit per successful page; search costs five per successful query and requires configured search. Set collection_id to your own existing collection. No requests run automatically."
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{api_key}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "base_url",
      "value": "http://127.0.0.1:3117"
    },
    {
      "key": "api_key",
      "value": ""
    },
    {
      "key": "collection_id",
      "value": ""
    }
  ],
  "item": [
    {
      "name": "Get usage",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": "{{base_url}}/api/pageflock/v1/usage"
      }
    },
    {
      "name": "Extract a page \u2014 1 credit",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": "{{base_url}}/api/pageflock/v1/scrape",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"url\": \"https://example.com\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "Extract custom fields \u2014 1 credit",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": "{{base_url}}/api/pageflock/v1/scrape",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"url\": \"https://example.com\",\n  \"extract\": {\n    \"heading\": {\n      \"selector\": \"h1\"\n    },\n    \"links\": {\n      \"selector\": \"a[href]\",\n      \"attribute\": \"href\",\n      \"multiple\": true\n    }\n  }\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "description": "Single compound CSS selectors on static HTML. Up to 10 named fields; no traversal or pseudo-classes. Included in the ordinary one-credit request."
      }
    },
    {
      "name": "Search \u2014 5 credits",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": "{{base_url}}/api/pageflock/v1/search",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"query\": \"site:example.com\",\n  \"country\": \"us\",\n  \"language\": \"en\",\n  \"limit\": 5\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        }
      }
    },
    {
      "name": "List collections",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": "{{base_url}}/api/pageflock/v1/collections"
      }
    },
    {
      "name": "Read a collection",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": "{{base_url}}/api/pageflock/v1/collections/{{collection_id}}"
      }
    },
    {
      "name": "Download collection JSON",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": "{{base_url}}/api/pageflock/v1/collections/{{collection_id}}/results"
      }
    },
    {
      "name": "youtube \u2014 dedicated API",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": "{{base_url}}/api/pageflock/v1/youtube",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"url\": \"https://www.youtube.com/watch?v=jNQXAC9IVRw\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "description": "Metered request. See /apis for fields and costs. Products require published Product JSON-LD. Search requires enabled Serper."
      }
    },
    {
      "name": "products \u2014 dedicated API",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": "{{base_url}}/api/pageflock/v1/products",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"url\": \"https://your-store.com/products/example\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "description": "Metered request. See /apis for fields and costs. Products require published Product JSON-LD. Search requires enabled Serper."
      }
    },
    {
      "name": "search/news \u2014 dedicated API",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": "{{base_url}}/api/pageflock/v1/search/news",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"query\": \"renewable energy\",\n  \"country\": \"us\",\n  \"language\": \"en\",\n  \"limit\": 10\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "description": "Metered request. See /apis for fields and costs. Products require published Product JSON-LD. Search requires enabled Serper."
      }
    },
    {
      "name": "search/videos \u2014 dedicated API",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": "{{base_url}}/api/pageflock/v1/search/videos",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"query\": \"site:youtube.com design systems\",\n  \"country\": \"us\",\n  \"language\": \"en\",\n  \"limit\": 10\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "description": "Metered request. See /apis for fields and costs. Products require published Product JSON-LD. Search requires enabled Serper."
      }
    },
    {
      "name": "Discover published contacts \u2014 1 credit",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": "{{base_url}}/api/pageflock/v1/contacts",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"url\": \"https://www.w3.org/Consortium/contact\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "description": "One public page; published contacts with source evidence. No mailbox verification or automatic follow-up. Successful empty pages also cost one credit."
      }
    }
  ]
}
