POST
/
api
/
ai
curl --request POST \
  --url https://app.mrscraper.com/api/ai \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "urls": [
    "https://www.solcom.de/de/projektportal/java-projekte-fuer-freelancer"
  ],
  "min": 1,
  "max": 4,
  "schema": {
    "type": "object",
    "description": "jobs",
    "properties": {
      "jobs": {
        "type": "array",
        "description": "List of jobs",
        "items": {
          "type": "object",
          "description": "job information",
          "properties": {
            "job_title": {
              "type": "string",
              "description": "job name"
            },
            "job_location": {
              "type": "string",
              "description": "location for the job"
            },
            "job_salary": {
              "type": "number",
              "description": "salary"
            },
            "job_type": {
              "type": "string",
              "description": "job type"
            },
            "job_details": {
              "type": "nested",
              "description": "details for each job from nested web content in each job detail link",
              "schema": {
                "type": "object",
                "description": "job details",
                "properties": {
                  "job_tasks": {
                    "type": "array",
                    "description": "job tasks",
                    "items": {
                      "type": "string",
                      "description": "task"
                    }
                  },
                  "job_requirements": {
                    "type": "array",
                    "description": "job requirements",
                    "items": {
                      "type": "string",
                      "description": "requirement"
                    }
                  }
                }
              }
            },
            "job_currency": {
              "type": "string",
              "description": "the currency of the salary"
            }
          }
        },
        "required": [
          "job_title",
          "job_location",
          "job_salary",
          "job_type",
          "job_currency"
        ]
      }
    },
    "required": [
      "jobs"
    ]
  }
}'
{
  "result": {
    "jobs": [
      {
        "job_title": "Senior Java Developer",
        "job_location": "Berlin, Germany",
        "job_salary": 80000,
        "job_type": "Freelance",
        "job_details": {
          "job_tasks": [
            "Develop new features",
            "Maintain existing codebase"
          ],
          "job_requirements": [
            "5+ years of experience",
            "Strong knowledge of Java"
          ]
        },
        "job_currency": "EUR"
      },
      {
        "job_title": "Full Stack Java Developer",
        "job_location": "Eindhoven, Netherlands",
        "job_salary": 75000,
        "job_type": "Contract",
        "job_details": {
          "job_tasks": [
            "Develop web applications",
            "Collaborate with team members"
          ],
          "job_requirements": [
            "3+ years of experience",
            "Knowledge of Spring Boot"
          ]
        },
        "job_currency": "EUR"
      }
    ]
  },
  "tokenUsage": 6,
  "totalDone": 1
}

Authorizations

Authorization
string
header
required

You can retrieve your token by visiting the API Tokens section inside your profile page or see https://docs.mrscraper.com/documentation/api-token for the details.

Body

application/json
urls
string[]
required

List of urls being scraped

schema
object
required

Defines how the AI will structure and return the scraped results. The result will be formatted according to this schema. The schema follows the rules defined in https://json-schema.org/. If the type is 'object', the 'properties' field is required. If the type is 'array', the 'items' field is required.

min
integer
default:
10

The minimum number of data items you want for each URL scraped. For example, if min: 100, but only 10 data items are available on the web, it will return 10 items, not 100. This ensures you get as much data as possible without causing errors when less data is available than requested.

Required range: x > 1
max
integer
default:
20

The maximum number of data items you want for each URL scraped. For example, if max: 100 and the data in the URL contains 200 items, it will return only 100. This allows you to limit the amount of data retrieved to manage processing time and resource usage.

Required range: x > 1
timeout
integer
default:
180

Scraping timeout in seconds. If it runs beyond the time limit, it will stop scraping and return the successfully scraped data.

Required range: 60 < x < 600

Response

200
application/json
Successful response
result
any

The scraped data according to the provided schema.

tokenUsage
integer

The number of token usage during scraping.

totalDone
integer

The number of URLs successfully scraped.